Add user from terminal but, the new user should set password when they log in for the first time

gnomelinuxterminaluser-accounts

How to add user like gnome does from terminal? I mean, I want the new user to set a password when they log in for the first time. But how?

Best Answer

You can create a normal user with the useradd command. After you added the user, you should be able to let the password expire with: passwd --expire USERNAME.

Now the user has to change the password on the next login.

Related Question