Q. How do I delete user Password under Linux? I'd like to disable a password for an account.
A. All user encrypted passwords are stored in /etc/shadow file. The quick way to remove/delete a user password is pass --delete option to passwd command. First, login in as a root user.
Command to delete user password under Linux
Type the following command to delete a user password:
# passwd --delete username
OR
# passwd -d username
Above command delete a user's password (make it empty). This is a quick way to disable a password for an account. It will set the named account passwordless. User will not able to login. It is also a good idea to setup user shell to nologin to avoid security related problems:# usrmod -s /sbin/nologin usernameFor example to delete password for user sweta, Type:# passwd -d sweta
# usrmod -s /sbin/nologin sweta
See also:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop











{ 11 comments… read them below or add one }
I have a Doubt,I want ssh and sftp to remote machine without asking password.
I did lots of thing according to the net help but it is still asking password.
I did on server as follows
1) ssh-keygen -t dsa; ssh-keygen -t rsa
2) copied it on remote host in my home dir. /.ssh/authorized_key
but it is asking password
3) on server i gave command ssh-agent $SHELL and ssh-add
some simple mistake is there but i am not able to find out could anybody help me out.
The filename is “authorized_keys”, in plural :-)
if 3/4 client machines are connected to a solaris server,what would be the command to know that each and every client machine using the memory and other resources of the server and upto what %
hemant,
You are posting questions to wrong topic, anyway join our forum and post your question in appropriate thread.
For ssh see this FAQ
i need help on deleting my myspace account i lost my password on there.. and i need it deleted so i can put a new one up there,
i would appreciate any tips thankz
miranda s
plese send shortcut command in my email id .
nice one, though I did not require the nologin part, now I can log in without password.
UHm. I tried this but this it says permission denied .. and this is the only account on this ubuntu. So I’m lost :S
this si how my line looks like:
sudo passwd -d username
it worked, but my friend forgot to type sudo, (read everything before starting :P)
i forgot password on linux cp, DELL is there any way to get in my account without password
i am a user of linux.but i forget my linux password please help me to delete passwogr