Operating System - HP-UX
1829545 Members
2192 Online
109992 Solutions
New Discussion

Setting a user password not to expire

 
SOLVED
Go to solution
Gerald Virden
Advisor

Setting a user password not to expire

I know this is probably an obvious question but I can't find an answer.
I am setting up system password expiration. However, there are system accounts and a couple generic accounts that I don't want to expire. How would I use the passwd command to set these users not to expire?
3 REPLIES 3
Pete Randall
Outstanding Contributor
Solution

Re: Setting a user password not to expire

Gerald,

See "man passwd". I would think that "passwd -n 0 -x 0" would accomplish what you want.


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: Setting a user password not to expire

best bet is sam

Accounts and users users

modify the user

password aging

or

user='username"

MINDAYS=7
MAXDAYS=360

passwd -r file -n $MINDAYS -x $MAXDAYS $user

You can crank that date up to a very high number. Thats better than not expiring at all.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sridhar Bhaskarla
Honored Contributor

Re: Setting a user password not to expire

Hi,

You would need to use


/usr/lbin/modprpw -l -m mintm=0,exptm=0,expwarn=0,lftm=0 login_id

Or use SAM.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try