1834391 Members
1572 Online
110066 Solutions
New Discussion

Need help in scripting.

 
Amruth
Regular Advisor

Need help in scripting.

Hello all,

I have been assigned a job to send a report to every users "When their password will expire".

We only have trusted systems and i have created a list of server in a file called hpserverlist.

I am not good at scripting but knows little bit.

My intention is to create an output in a file with the following:

SERVER NAME : USER NAME : DATE of Expiration.

i am also on the job, but if anybody is quicker than me ...i will really appreciate it.

THanks,
am
If i am doing the same way you are doing to me then what is the difference between us.
2 REPLIES 2
c_51
Trusted Contributor

Re: Need help in scripting.

doing a seach on password trusted expire will give you lots of information.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=695870

and

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&admit=-1335382922+1103740686914+28353475&docId=200000074740865

lots of good information about scripting at this site also
Mark Greene_1
Honored Contributor

Re: Need help in scripting.

See the man page for getprpw. The combination of options you'll want is probably going to be these:

/usr/lbin/getprpw -m exptm,lftm,expwarn,mintm,acctexp

the second value, lftm, is the password lifetime in number of days since last change. If you get the date from the ls -l listing for /tcb/files/auth/[letter]/[loginID]

where [letter] is the first letter of the LoginID and [LoginID] is the ID you want to query, that will get you where you want to go. The actually expiration date and time are stored in that file (the number after "u_suclog#"), but it's in internal format and you'd have to resort to a C library call to get it converted, I think.

mark
the future will be a lot like now, only later