244

Just want to ask, if i change the password on the root user, is that going to automatically change the password to on the user account?

i found this link to change the root user

http://www.wikihow.com/Change-the-Root-Password-in-Linux

How do I change the user account password?

  • 2
    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.) – Evgeni Sergeev Jan 5 '17 at 5:06
400

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
    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 '16 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 '16 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 '16 at 14:52
  • 3
    @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 '16 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 '17 at 11:21
11

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.

  • 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 '14 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 '17 at 12:02

protected by Community Jul 17 '16 at 14:41

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.