Cannot change Ubuntu root password

1

I've tried to use this to change my Ubuntu 10.04 password

sudo passwd

The process goes fine, I type the new password and the get the message on successfull completion. However, nothing actually happens, because on the next chance I have to type the password - old one works.

What do you think?

lyuba

Posted 2010-09-24T11:09:59.170

Reputation: 145

You enabled a root password on Ubuntu? Normally the root account is not login-enabled. Why did you feel you needed to do that? – CarlF – 2010-09-24T12:45:52.787

Because I didn't know the difference between my user+sudo and real root before.. ) – lyuba – 2010-09-24T17:51:38.530

Answers

2

I'm not sure that you have got what you are actually doing; apologies if the following is obvious to you and I'm reading too much or not enough into your question.

sudo passwd sets the password for the user root. Once you have done this, you can log into your machine with the username root and the password you have set (in a terminal anyway, it is probably not allowed at a graphical login). You can also become root in a terminal on your desktop by using the command su - and entering the password for root.

What will not change is your user password, ie the one you use to log in with and the one you use when you use sudo.

The difference between "becoming root" and using sudo is that if you are going to perform a series of commands that use root priviledges, you can become root and then run the commands at the prompt (the prompt will normally change from a $ to a # and may also change colour to show that you are now the root user) whereas if you stay as yourself and use sudo, each command you enter needs to be preceeded by sudo.

Neal

Posted 2010-09-24T11:09:59.170

Reputation: 8 447

Neal, thank you very much for the explanation, as I didn't know that! I've done passwd mysername and got the expected result. Thank you! – lyuba – 2010-09-24T17:50:58.227