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


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


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  



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