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.

When I try to switch to another user from the command line using "su", I get an authentication failure, as shown below:

su - otheruser

Password: *****

su: Authentication failure

Yet I know that the password is correct because I can successfully log in to the desk top as the other user from the Ubuntu login screen.

Does anyone know what could be causing this problem?

share|improve this question

2 Answers 2

See this page for what you should use for a rootshell: RootSudo

This page also will explain how to get a terminal as another user. Short version: sudo -i -u <username>

There's an Ubuntu SO-based site here: http://askubuntu.com/

share|improve this answer

You need to be root to do "su". You can "sudo su - user" or you can "sudo su -" then do "su - user". Enter the password of the user you are now when you do the sudo. ex. "whoami"

share|improve this answer
    
Don't use su on Ubuntu. –  Broam Oct 13 '10 at 17:59
    
My question is why is it there if I should not use it? Ok, how about this one: "sudo -u <username> <command>" ? –  SuperJames Oct 14 '10 at 13:46
    
Please see my answer for why - the official justification is listed there. –  Broam Oct 14 '10 at 19:19
1  
sudo -i is proper if you need a rootshell. See ubuntuforums.org/showpost.php?p=6188826&postcount=4 –  Broam Oct 14 '10 at 19:22

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.