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)
- Docker: How to copy files to/from docker container - June 30, 2020
- Anisble: ERROR! unexpected parameter type in action:
Fix- June 29, 2020
- FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- 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