1

I have been looking through the Solaris man pages: usermod, passwd and haven't had much luck. I'm trying to find the equivalent of chage -d that we have used on Linux in the past. This let's you set the date value of:

root@host:~# passwd -s someuser  
someuser  PS    02/08/17     0    10  

the 02/08/17 date is what I'm trying to change. I can do this in Linux with the following(to change the date to 10 days into the future):

 /usr/bin/chage -M 10 -d $(date +%F)

Any ideas or help would be greatly appreciated.

2

Solaris doesn't provide chage, but you can easily set the max number of days a password will be good for by using -x:

http://docs.oracle.com/cd/E86824_01/html/E54763/passwd-1.html#scrolltoc

I believe 10 days from now would be:

passwd -x 10 someuser

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.