Create a user without password in linux
Note: having an account without password might be a security threat. I recommend to only enable the account when needed, and disable the account afterwards again. How to do this is described below~
Create user without password
Creating the user is easy. As root type:
and fill in the required information. Provide the user with a password (it is irrelevant which passwrord). Now we will remove the password and enable the account:
passwd -d -u
The -d switch removes the password, and the -u switch unlockes the account. The user can now login without entering a password.
Create a new password for the user
This works for any user! Just type:
and fill in new password.
Lock the user account
If there is nobody using the account, but you want to save it for later use… just lock the account:
and ready. You can unlock it again at a later time by typing:
Remove a user
If there is no more use for the user account, and you want to remove it… just do the following (the following command will remove the users home folder, if you want to keep it… do not enter the -r switch… and/or make a backup of the home folder!):