Operating System - HP-UX
1847693 Members
4040 Online
110265 Solutions
New Discussion

System Default Inactive Time Setting

 
SOLVED
Go to solution
Nellian Solaiappan
Frequent Advisor

System Default Inactive Time Setting

Hi
I'm trying to write a script that returns a list of users along with their Inactive Time, Password Expirty Time, Password Life time etc. I can do that using getprpw command and the respective -m options. But for cases where I get a -1, it actually means that the entry was not found in the database and which in turn I assume, means that the user takes the setting from system default.
My question now, is how can i get system default settings like Inactive period, password life etc through commandline.

Regards
Nell
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: System Default Inactive Time Setting

Those data are stored in /tcb/files/auth/system/default.
If it ain't broke, I can fix that.
Robert-Jan Goossens_1
Honored Contributor

Re: System Default Inactive Time Setting

Hi,

Correct -1 is default.

exptm = Password Expiration Time (default is 180 days)
lftm = Password Life time (default is 210 days)
expwarn = Password Expiration Warning Time (default is 21 days)
mintm = Time between password changes (default is 60 days)

Hope this helps,
Robert-Jan
Nellian Solaiappan
Frequent Advisor

Re: System Default Inactive Time Setting

Hi
I did find the system default values, even before I started this thread,in the /tcb/files/auth/system/default file. But I dont have a direct answer to my question in that file since the entry that im concerned with is
:u_llogin#7776000 which is how the value 90 is represented. How can read this value from the file into meaningful number of days.

Regards
Nellian
Robert-Jan Goossens_1
Honored Contributor

Re: System Default Inactive Time Setting

7776000 / (24X60X60) = 90 days

nuber of seconds / seconds per day

Robert-Jan
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: System Default Inactive Time Setting

The value you list is in seconds so simply take the value and divide it by the number of seconds per day (24 * 60 * 60) = 86400

In your example:
7776000 / 86400 = 90

Other time values are stored as the number of seconds since 1-1-1970 00:00:00 UCT (epoch seconds). To cenvert these:
perl -e 'print scalar localtime(xxxxxx)'
where xxxxxx is the epoch seconds value.
If it ain't broke, I can fix that.
Robert-Jan Goossens_1
Honored Contributor

Re: System Default Inactive Time Setting

Hi Nell,

There is an example of a script, check below page.

Trusted system - How to find user's passwords about to expire
Document id: USECKBAN00000934

US
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000074740865

Europe
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000074740865

Regards,
Robert-Jan
Nellian Solaiappan
Frequent Advisor

Re: System Default Inactive Time Setting

Thank you Clay and Robert! you guys are wonderful. I did the conversion of secs in my script and it works fine.