Thursday, March 21, 2013

Linux/Solaris set password to non expiry


Solaris 10
server# passwd -s dmadmin
dmadmin   PS    01/16/13     7    84    28

server# passwd -x -1 dmadmin
passwd: password information changed for dmadmin

server# passwd -s dmadmin
dmadmin   PS

server# grep dmadmin /etc/shadow
dmadmin:aDHLqWdyzszdc:15721::::::
server#

Linux


server:~ # chage -l dmadmin
Minimum:        0
Maximum:        90
Warning:        7
Inactive:       180
Last Change:            Jan 17, 2013
Password Expires:       Apr 17, 2013
Password Inactive:      Oct 14, 2013
Account Expires:        Never

server:~ # chage -m 0 -M 99999 -I -1 -E -1 dmadmin
Aging information changed.

server:~ # chage -l dmadmin
Minimum:        0
Maximum:        99999
Warning:        7
Inactive:       -1
Last Change:            Jan 17, 2013
Password Expires:       Never
Password Inactive:      Never
Account Expires:        Never
server:~ #