SybaseのASE 12.5内の個々のパスワードの有効期限の間隔を報告
-
18-09-2019 - |
質問
私は、すべてのユーザーのパスワードを30日ごとに有効期限が切れるように設定されていることを確認するためにレポートを実行したいのですが、有効期限の間隔がsysloginsのに格納されていないようです?
解決
次の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を)
他のヒント
あなたはすべてのユーザーのパスワードの有効期限を設定するには、sp_configureを使用することができます。
sp_configure "systemwide password expiration", 30
go
は、30日後に期限切れになるように、すべてのユーザーのパスワードを設定します。この値はいえレポートのために読み取ることができるかどうかわかりません。デフォルトは0です。
してみてください。
幹部にsp_displaylogin
個々のユーザーの設定のためにパーマを取得するには、そのユーザとしてログインします。
所属していません StackOverflow