[colug-432] Change Root Password

Rick Hornsby richardjhornsby at gmail.com
Wed Dec 19 16:30:32 EST 2012



On Dec 19, 2012, at 15:18, Thomas Cranston <thomas.w.cranston at gmail.com> wrote:
> 
> Running Mint 14.1 The root password by default is the same as whoever installed. During setup, I used a totally unacceptable PW even by my standards.
> 

I've never used mint, but it may be that the same password is established for the root and user (tom) accounts during the installation. After that, however, they would be separate and independent entities.

I think you're mixing two things up below.


> tom at tom-Inspiron-1520-mint ~ $ passwd
> Changing password for tom.
> (current) UNIX password: 
> passwd: Authentication token manipulation error
> passwd: password unchanged


passwd, when executed in a non-root context, first prompts for the CURRENT password of the account. That is, the password you're using now to log in as tom.


> tom at tom-Inspiron-1520-mint ~ $ sudo passwd
> [sudo] password for tom: 
> Enter new UNIX password: 
> Retype new UNIX password: 
> passwd: password updated successfully
> tom at tom-Inspiron-1520-mint ~ $ 

You just changed the password for the user root. Not tom. Again, these are two completely separate identities/users.

> tom at tom-Inspiron-1520-mint ~ $ sudo su root
> [sudo] password for tom: 

This is asking for tom's password. Which to this point remains unchanged. sudo is asking you the current user - tom - to authenticate as himself before allowing tom elevated privileges. tom is not expected to and should not know the root password.


> #tried the new password
> 
> Sorry, try again. 

correct, and expected.


> [sudo] password for tom: # tried original password
> 
> tom-Inspiron-1520-mint tom # 
> 

I'm not following this part, but I'm inferring that the sudo command succeeded?

> I want to be able to change the password that I login with after I startup my laptop.

Yep. You had the correct approach above, but I think missed what Linux was telling you. Forget about sudo for a minute, I think it is just confusing you.

Use the command "passwd" (no sudo), and on the first prompt, provide tom's current password that you just used to successfully log in.

Remember, if you prefix a command with "sudo", you're running that command AS root, a completely different user than tom, and you're therefore manipulating objects that belong to root, not to tom - which is what you're asking for.

sudo = superuser do (or, "do command as superuser")

-rick


More information about the colug-432 mailing list