Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
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 Sep 24 '10 at 12:45
    
Because I didn't know the difference between my user+sudo and real root before.. ) –  lyuba Sep 24 '10 at 17:51

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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 Sep 24 '10 at 17:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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