About Linux FAQ

Browse More FAQs:

Linux: Delete user password

Posted by Vivek Gite [Last updated: September 6, 2007]

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:

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Discussion on This FAQ

  1. hemant Says:

    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.

  2. hemant Says:

    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 %

  3. nixcraft Says:

    hemant,

    You are posting questions to wrong topic, anyway join our forum and post your question in appropriate thread.

    For ssh see this FAQ

  4. miranda starling Says:

    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

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , ,

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.