تقرير عن فترات انتهاء صلاحية كلمة المرور الفردية في 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.
يحاول
exec sp_displaylogin.
للحصول على رأسي لإعدادات مستخدم فردي، قام بتسجيل الدخول كما المستخدم.