Password expiration



Reaction score: 1
Messages: 42

Hi guys!
I would like to create KVM containers which will come with a default password.
As a security measure I would like to force them to change password at 1st login, how should I proceed?
Thank you!


Son of Beastie

Reaction score: 2,052
Messages: 3,770

Well, passwd(5) comes to mind as well as adduser(8).

Password expiration is supported by the OS itself so that shouldn't be an issue. You can build a skeleton user directory through /usr/share/skel (see also that adduser manualpage) and there you could set up a script which forces users to change their password. When done you'd remove the script and you're set up.



Reaction score: 37
Messages: 87

Try to set expired password for the user
pw usermod -n username -p 01-jan-2000 works for me.