2

I need to expire all the new and manually reset passwords in a server. When a new user logs into the server the first time it should force him to change the password. My first guess is that I have to use the command chage -d 0

1 Answer 1

2

After creating user you may use

[root@localhost~]# chage -d 0 username  

to force a user to change their password at next logon on a Linux.

If you want to automatically do that every time just after new user add. For that you edit the configuration file which locate at

[root@localhost] # vi /etc/default/useradd

Search Expire and Make it

Expire=0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .