Why the "su - " command not working

Asked by Rocco on 2009-03-31

when i do: su -

the answer is: su: Authentication failure

I do not undertand since I only have one login on the system that was created at install.

Any ideas ?

Rocco

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
peter b
Solved:
2009-03-31
Last query:
2009-03-31
Last reply:
2009-03-31
Best peter b (b1pete) said : #1

try

sudo <command>

regards,
peter b

ps. you can try also

sudo -i

but after carrying out the root command pls always use

exit

to go back to your normal status of user.

Rocco (racicot-sylvain) said : #2

Thanks peter b, that solved my question.

Abhishek Mishra (ideamonk) said : #3

Since we don't get a chance setting root password in the install (Ubuntu 8.10 in my case), the root password is unknown.
While the user which you specify is added to sudoers list by the installer.
Hence, you are able to do sudo <command> but not su

One solution to this would be to change root's password this way -
$ sudo passwd
enter your password
[ enter new password for root ]

after this, you can do 'su' easily as you know root's password now.

even try using 'sudo su'