LINUX CLASSES - LINUX COMMANDS
Linux Change Password
How Do I Change my Linux Password?
You can use the passwd
command to change your log-in password, and as you can tell from the man
output shown in the preceding section, you have quite a few options. Here are some of the most common: passwd Change your own
passwd sleepy Change sleepy's password.
passwd -d sleepy Delete sleepy's password.
When you enter one of these commands to change a password, you will be prompted for the old (current) password and a new password. Your new password should be at least six characters long and not too easy for someone else to guess. Oh, and writing it down on a scrap of paper taped to your monitor is not recommended either. :-)
If you share your Linux system with multiple users, or if you have a dial-in modem attached, password security for each account is particularly important. But if you're the only one who will ever lay a finger on your system, you might want to delete your password, thus removing the need to enter it each time you log in. It's your call, but you never know when your five-year-old will wander by
By the way, you might get the idea from the preceding commands that users can go around changing each other's passwords at will, but that's not the case. Only a superuser (such as root) can change or delete another user's password.
For more information on the passwd command, see the passwd manual.
Previous Lesson: Important Linux Commands
Next Lesson: Switching Users
[ RETURN TO INDEX ]
Comments - most recent first
(Please feel free to answer questions posted by others!)
(07 Jan 2013, 19:50
How can i make the system to ask for a password change before a user starts working with the root specified(given) password so that user can login with his own password next time....
(05 Jan 2013, 01:13
Everytime I logon to my linux servers, it ask's me to change my pw. How do I avoid this from happenning? I don't have this issue on Solaris servers.
(25 Nov 2012, 05:07
How can I install other microsoft-compatible softwares such as dictionary in Linux
(23 Apr 2012, 09:47
We are in a process of changing the Linux server password. We have used "passwd" command and successfully change the password. we have changed the password 3 times and all attempts are successfully executed. Now we want to make the password as it was there previously. when we
are chnaging to old password, teh change is not happening and the error is coming as "BAD PASSWORD: has been already used"..Please help
(15 Apr 2012, 04:36
hi Sir bob could you please explian how to download a file example firefox and how to exreactthe file or any file after download iam using debian
Once again thank you Mr BOb
(28 Mar 2012, 16:53
(05 Mar 2012, 06:24
well done, quick and to the point. Just what I needed.
(18 Feb 2012, 12:46
Thank you for your articles.
Now,I have a bother like that when i enter the "passwd" command in linux,then on the next line will show the promopt text like that "New Password", and now if i want to get the promopt text and what can i do for the goal.
(17 Feb 2012, 09:47
i can not install google chrome
(16 Oct 2011, 15:55
@Sunny, Hi Sunny, this is Tim
Took care of that one too... I'm on a roll...(whew) this is hard work!
(15 Oct 2011, 12:07
hi this is sunny
(04 Oct 2011, 15:23
@mohammad - If you don't have the root password, you can't change it.
(04 Oct 2011, 10:03
how can i prevent the others to change root password ?
(08 Aug 2011, 08:21
@Vishal P, well he said that it does delete the password or are you too afraid to try it?
(07 Jun 2011, 02:12
is it possible to delete password of any user using following commands:-
passwd -d "username"
(09 May 2011, 05:32
i want to know how my passwd would expire after some time
(09 Jan 2011, 22:51
i am installed fedora12 i want practice user and admin commands some commands is not working pls tell me whhich window i am practicing unix commands. terminal window is not supporting to all commands.
(17 Dec 2010, 10:58
the command doesnt work! how do i change my password??
pleas help me
(12 Dec 2010, 02:13
r changing the Super User Password Go into single mode and change the root password.
(09 Dec 2010, 15:36
Hmm, maybe this has to do with the roblox thing.
(01 Nov 2010, 12:53
@Jeff LOL, "found" a laptop/PC on your doorstep! Stop stealing, dude :P
(12 Oct 2010, 05:20
Last time I forgot my password and tried everything i could do but failed, until I found this great tool Windows Password Software. It works great, and you can google it.you can try to google it.
(17 Sep 2010, 22:52
Download some new linux discs of whatever flavor you want. Ubuntu is really easy. Others may be just as easy. Burn the ISO(s) to DVD/CD. Put them in, restart computer and make sure your BIOS is set to boot to DVD/CD device first. Follow instructions from linux installer. Enjoy your new Linux installation.
(10 Sep 2010, 14:09
I recently received a comp as a "gift" from an unknown person(left on doorstep). It has a Linux system. I am a Linux Virgin. It is asking for a username and a password. I have NO IDEA what they would be. Is there a way to bypass this or a way to get the username and password changed? Any HELP from ANYONE would be helpfull.
(26 Aug 2010, 00:12
Thank you so much, it helped me.
(26 Jul 2010, 13:38
how to change a password? what are septs?
(09 Jul 2010, 08:20
suppose a user forgot his password and he asking the admin to change the password then what are the steps should be followed by the admin and what are the different ways of changing it could u please mail me out
(25 Jun 2010, 10:28
you have another soloution in changin the password of superuser.
restart the system
press any key while booting
it takes to you have a screen
select required ie
you will get a terminal
you can directly log in as superuser
using passwd command you can change
(25 Jun 2010, 10:26
you cannot see the password.
instead you can change the password.
log in as single user.
you can do this by init 1 which shutdowns the
now u can login as single user.
change the password by passwd+enter
give the password
(25 Jun 2010, 08:38
change my password
(24 Jun 2010, 21:46
i am a account in administrator . i don't know my adminstrator password how to know my administrator password
(10 Jun 2010, 12:19
just use passwd and press enter.
it will ask for new password.
enter it two times.
(10 Jun 2010, 04:48
For changing the Super User Password Go into single mode and change the root password.
(09 Jun 2010, 20:00
$ sudo su
***prompt will change***
(08 Jun 2010, 22:27
I can not change password Linux
(05 Apr 2010, 07:19
Login as the superuser, then use the passwd command.
(10 Mar 2010, 05:53
how to change super user password
I welcome your comments. However... I am puzzled by many people who say "Please send me the Linux tutorial." This website *is* your Linux Tutorial! Read everything here, learn all you can, ask questions if you like. But
don't ask me to send what you already have. :-)
NO SPAM! If you post garbage, it will be deleted, and you will be banned.
Copyright © by Bob Rankin
All rights reserved - Redistribution is allowed only with permission.
More To Explore