Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I add a new user to my system I set a password and tell it to the new user. If the user doesn't like it, he/she can change it. However in my opinion it is better to force the user to change his/her password at the first login. Is there a way I can do that in Ubuntu?

share|improve this question
up vote 37 down vote accepted

You can just expire that password. After creating a new user foo, just type:

sudo chage -d 0 foo

And he will be forced to change it after first logon.

share|improve this answer
    
Why is the subcommand called chage ? – T.W.R. Cole Oct 20 '15 at 18:21
1  
I'm not sure, but if I was to guess: "ch" prefix comes from word "change". other commands that change something in the system also start with "ch", for example "chmod", "chown", etc. "age" suffix probably comes from the fact that this changes the age of the password - but that's a blind guess. – kars7e Oct 22 '15 at 4:38
    
chage stands for "change age", i.e chage command abbreviation is similar to chmod, chown etc. – DL6ER May 3 at 12:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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