How do I change my password in linux?

ow 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


credit to source http://www.cyberciti.biz/faq/linux-change-password/

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How do I change my remember password options in Google Chrome

Manage your website passwords This article applies to the Google Chrome browser on Windows,...

Change time is Gmail

Correct Your Gmail Time Zone To set your Gmail time zone: Click the gear in your Gmail's...

How to speed up Windows XP use at your own risk

Warning: occasionally people break their PC badly by using this list of suggestions. Usually...

How to run cmd in escalated mode with admin rights to modify firewall

a solution: runas /user:administrator@domainname.local cmd then in the resulting command...

How do I enable auto login in Windows

This article describes how to configure Windows to automate the logon...