How to delete or remove user password in Linux?
Some times you require to set passwordless logins to a user for auto logins, shell scripting so that you no need to provide any password. This can be achieved by using passwd command with -d option which deletes already assigned password.
passwd -d username
passwd -d temp
Removing password for user temp.
Once you are done with this change the password field in /etc/shadow field is changed to empty so that without password you can login from any machine to the local machine.
Update: Some users pointed out that this works only for local logins, but for remote logins this will not work.
Latest posts by Surendra Anne (see all)
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018
- wget download a file to a directory in Linux/Unix - June 4, 2018
- GIT: How to compare two GIT branches? - June 3, 2018
- Online training on Linux Bash shell scripting - February 8, 2018