Ubuntu: Creating a user without its account being disabled [duplicate]



Question:

This question already has an answer here:

Is there a way to create a new standard user, who can log in immediately? When I create users through a shell script, the users do get created, but they are disabled. Is there are way to create them so that they can log in without additional actions?

I use Ubuntu 16.04


Solution:1

Since you can create a user then your script works, now use the chpasswd tool to create a password for your users as without this, they won't be able to sign in after creation.

echo username:username | chpasswd  

Source:

https://stackoverflow.com/questions/2150882/how-to-automatically-add-user-account-and-password-with-a-bash-script


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »