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 the keyboard!
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
Comments (most recent first)
Ks (26 Aug 2010, 00:12)
Thank you so much, it helped me.
mounisha (26 Jul 2010, 13:38)
how to change a password? what are septs?
Somu (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
sureshbvn (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 kernel press b you will get a terminal you can directly log in as superuser using passwd command you can change
sureshbvn (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 networking. now u can login as single user. change the password by passwd+enter give the password
ezat (25 Jun 2010, 08:38)
change my password
Raghavendra (24 Jun 2010, 21:46)
i am a account in administrator . i don't know my adminstrator password how
to know my administrator password
suresh (10 Jun 2010, 12:19)
just use passwd and press enter.
it will ask for new password. enter it two times.
Aniket Kulkarni (10 Jun 2010, 04:48)
For changing the Super User Password Go into single mode and change the
root password.
patricia (09 Jun 2010, 20:00)
@Kanya:
$ sudo su ***prompt will change*** # passwd # exit
Kanya (08 Jun 2010, 22:27)
I can not change password Linux
Bob Rankin (05 Apr 2010, 07:19)
Login as the superuser, then use the passwd command.
Mahesh Narayan (10 Mar 2010, 05:53)
how to change super user password
|
|
|
![]() |
|
| <Send This Link to a Friend> <Bookmark This Page> | ||