Force the user to change their password at first login
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.
Another option would be to expire the password using passwd
:
sudo passwd -e username