Link to home
Start Free TrialLog in
Avatar of motioneye
motioneyeFlag for Singapore

asked on

sybase, how to extract login from syslogins with information and pwd expiration

Hi,
In syslogins sybase I able to have all login name, but how do I extract information on wheter the account has pwx expiration enable or not, I can use sp_displaylogin but this will only on individual login
Avatar of Jan Franek
Jan Franek
Flag of Czechia image

Look into sp_displaylogin source - it seems like pwd expiration can be stored in three places - 2x in sysattributes and 1x in sysconfigures (that is global serverwide pwd expiration)
/* Password expiration interval */
select @passwdexp = int_value 
from master.dbo.sysattributes
where class = @passeclass 
AND attribute = 0 
AND object = @suid
AND object_cinfo = "login"

if @passwdexp is  NULL
select @passwdexp = int_value 
from master.dbo.sysattributes
where class = 27 
AND attribute = 7

if @passwdexp is  NULL
select @passwdexp = value  
from master.dbo.sysconfigures  
where name = "systemwide password expiration"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jan Franek
Jan Franek
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ak50304
ak50304

What version of ASE are you working on ?
Avatar of motioneye

ASKER

Hi,
I'm working on ASE 15.0.3.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial