2009-07-21 46 views

回答

1

你可以用以下PROC报告:

use sybsystemprocs 
go 
---------------------------------------------------------------------------- 
print 'sp__helpexpire' 
---------------------------------------------------------------------------- 
if exists (select 1 from sysobjects where type = "P" and name = "sp__helpexpire") 
     drop proc sp__helpexpire 
go 
create procedure sp__helpexpire 
as 
begin 
    set nocount on 
    declare @swexpire int 
    select @swexpire=value from master.dbo.sysconfigures 
    where name = 'systemwide password expiration' 
    print "Serverwide password expire: %1!" ,@swexpire 
    print "" 
    print "Logins:" 
    print "==============================================================" 
    select l.name login , case a.int_value 
     when null then @swexpire 
     else a.int_value end "expire in days" 
    from master.dbo.syslogins l , master.dbo.sysattributes a 
    where l.suid *= a.object 
     and a.object_type='PS' 
     and a.attribute=0 
     and object_cinfo='login' 
    print "" 
    print "Roles:" 
    print "==============================================================" 
    select r.name "role name", case a.int_value 
     when null then @swexpire 
     else a.int_value end "expire in days" 
    from master.dbo.syssrvroles r , master.dbo.sysattributes a 
    where r.srid *= a.object 
     and a.object_type='PS' 
     and a.attribute=0 
     and object_cinfo='role' 
end 
go 

它始终是一个好主意,以检查这些系统程序(存储在sybsystemprocs数据库),它与你正在寻找记录操作的源代码(在此它是sp_addlogin,sp_modifylogin)

0

您可以使用sp_configure来设置所有用户的密码失效日期

sp_configure "systemwide password expiration", 30 
go 

将会把所有用户的密码在30天后到期。不知道这个值是否可以通过报表读取。默认值为0

0

尝试

高管的sp_displaylogin

以获取单个用户设置的烫发,登录的用户。