321

If I change the password for the root user is that going to automatically change the password for the user account?

I found this link for root:

WikiHow: How to Change the Root Password in Linux

How do I change the user account password?

1
  • 4
    New users take note: with Ubuntu, "By default, ... you cannot login as root directly or use the su command to become the root user. However, ... it is still possible to run programs with root-level privileges. This is where sudo comes in ... Just remember, when sudo asks for a password, it needs YOUR USER password, and not the root account password. ... Enabling the root account is rarely necessary. Almost everything you need to do as administrator of an Ubuntu system can be done via sudo or gksudo." (Excerpts from RootSudo on Ubuntu wiki.) Jan 5, 2017 at 5:06

2 Answers 2

507

To do it using command line:

To change the root password:

sudo passwd

To change your user password:

passwd

To change other users password:

sudo passwd USERNAME

To do it GUI open the application User Accounts from the Dash and there you can change password easily for all users unless the root

7
  • 9
    For other Ubuntu newbs like me, NB that the root password is not the same as "the admin" password. If you want to change an admin password for the current user, use the version without sudo. (This was not obvious to me, coming from a Windows background.)
    – user486425
    May 30, 2016 at 23:21
  • 1
    @ibgib Actually a Linux 'admin' is basically any user that can run as root. In Windows 'Run as Administrator' is similar to 'sudo'. When you run sudo with any command you are running as root, and thus sudo passwd will reset password for user root. Running passwd will reset the password for the existing user.
    – Molten Ice
    Sep 19, 2016 at 22:26
  • 1
    @ Molten Ice Thanks for your comment! It sounds like you're a Linux guru which is great! My comment is intended for Windows-oriented audiences. My point is that there is a difference between "root" password and "the admin" password. My experience, coming from a Windows background, had these two as equivalent, and so I used the version with sudo which was of course wrong. This threw me and I had to reread the answer (which is correct) to understand the situation. I posted the comment to help others who may have this same incorrect interpretation of the answer.
    – user486425
    Sep 21, 2016 at 14:52
  • 4
    @ibgib What @Molten Ice was pointing out is that there is no such thing as an ‘admin’ password for a user. All users have a password. Some users may have admin privileges, which, when using the sudo command, is used to ‘prove’ that it is really that user at the keyboard. And root is a user that has all admin privileges by default and doesn't need to use sudo to exercise those privileges. (Use sudo -i to ‘become’ root.)
    – equaeghe
    Sep 29, 2016 at 16:15
  • 1
    @ibgib: without the intention to come across a bit harsh about your windows background (I've had my share of win95 till winXP as well, moved to macosx and linux, both personal and professional) my advise is to forget everything you know about sysadmin (as long as it based on your experience with windows) and start all over in any *nix environment. (which is, at least that's my experience, great fun!)
    – RemyNL
    Jan 20, 2017 at 11:21
14

As a user, you can change your own password in a terminal, using passwd. You will be asked for the current password and can then enter a new one.

On Ubuntu, there normally is no separate password for root. Instead, users with administrator privileges may use sudo to run commands as a super user.

2
  • ok yea just saw this post http://www.cyberciti.biz/faq/changing-password-of-specific-account-in-linux-commandline/ but still thanks for clarifying.
    – Alisha
    Feb 21, 2014 at 0:55
  • Do I have to restrta my machine ?! because now I can log-out and log-in again using the old password !! ..
    – McLan
    Nov 3, 2017 at 12:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .