How do I change my own password as well as the passwords of other users as required under Linux operating system without using GUI systems?
You can use the passwd command to change your password, and, as a system administrator, change the password of the root account, or another user in your Linux system. The syntax is as follows:
passwd passwd {userName}
Task: Linux Change Your Own Password
Login using the ssh client or open a command-line terminal (select Applications > Accessories > Terminal), than type the following command:
$ passwd
First, the user is prompted for their current password. If the current password is correctly typed, a new password is requested. The new password must be entered twice to avoid typing errors. Running passwd command with no arguments will allow you to change your own password.
Task: Linux Change root's User Password
To change root's password, you must first login as root user or use sudo / su command to obtain root's credentials. To become the root user, enter:
$ su -l
OR
$ sudo -s
Next, to change root's password, enter:
# passwd
WARNING! You can change root's password only if you are logged in as the root user!Task: Linux Change Another User's Password
To change the password of another user, login as root and type:
# passwd userNameHere
# passwd tom
# passwd jerry
Getting Help
Anytime you need assistance with Linux passwd command-line, turn to the man page first. It will give you detailed information, parameters and switches for passwd command. For example, man passwd opens the man page for the passwd command:
$ man passwd
$ man 5 passwd
See also
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 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







![Ubuntu: Rename an Account [ User ID ]](http://s13.cyberciti.org/images/shared/rp/3/19.jpg)






{ 7 comments… read them below or add one }
1. Switch to root
[user1@localhost ~]$ su -
Password:
2. Change password for user2
[root@localhost ~]# passwd user2
Changing password for user user2.
New password:
BAD PASSWORD: it is WAY too short
BAD PASSWORD: is a palindrome
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]#
wat can chang passward of root
he can chang passwad of root
[root@localhost ~]# useradd speed
[root@localhost ~]# passwd speed < rambabu
> rambabu
> EOF
Changing password for user speed.
New password: BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password: passwd: all authentication tokens updated successfully.
[root@localhost ~]# useradd abcde
[root@localhost ~]# echo “password” | passwd –stdin abcde
Changing password for user abcde.
passwd: all authentication tokens updated successfully.
Hello ! i want to ask how i can change password for root if i forget my root pass and my linux is also need a login password . i forget login password for my user name ******* .how i can login to my workspace .
Login in single user mode and change the password. When you start the system just press the Ctrl+x for login in single user mode. And you will login there as root without password and you can change there your root password.
booting the machine, at that time press “a” then click the space bar and type “s” then click enter first we check if it is enforcing mode or permissive mode by using this “getenforce” command if it is “enforcing” setenforce 0 then it will be change permissive mode . then “passwd –stdin root” type the password that’s it…………
How about changing user I D and password not knowing either? Who am I requesting this info. from? Thanks ldn