0

How to remove password for the user in Linux

I have created two new users called test1 and test2 and also set password for those two users. Now i need to remove password for user test2 alone.

Linux Advanced commands Add a comment
matthew
asked Feb 18 2017

Answer

0

For setting password u will be using passwd command, to remove password use -d option.

Another method is to edit the /etc/shadow file. Open that file and search for the test2 user line.

test2:$6$emxCUzW0$NuN1tj0rshiK.ACU1trubeLGzLaLF0wtu3.qqV/vDN63cGzDRRJfL07nCDMiRHT8UMPLqXTXDKBcrMWTytSzs1:17203:0:99999:7:::

Here, remove the encrypted content between the : : Save the file and check, it will remove the password.

Add a comment
jagannatharumugam
asked Feb 19 2017
edited Oct 05 2018
Post your Answer