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 am new linux user especially on Ubuntu. I've installed Ubuntu Lucid Lynx using in Windows XP using Wubi. When I'm trying install java, it require su command, the instruction on java said I have to put my administrator password on it. Everytime I tried my password, it wont work. Then I realized my account is not an administrator, so I change it to Administrator, but still doesnt work. Any help?

share|improve this question
    
I dont know your answer is working or not, I should change question or browse Wubi troubleshoots, there are lot of common linux/ubuntu features didnt work in my installation. –  Vina Sep 16 '10 at 14:11
add comment

3 Answers

do you mean su comand, or sudo command ? - the sudo command needs the password of the normal user, and su needs the root password. By default in ubuntu the root account has no password and you get to it by "becoming root" via sudo.

try sudo -i give it your normal password, then do passwd root and you should be able to set a password for the root user. Then you can run su as a normal user to change user to root.

normal user -> sudo -> (user password) -> root for one command normal user -> su -> (root password) -> root until exit given.

sudo has configuration to say who can run which commands as root, but by default the user you created at install can do what you need.

does that help / make sense ?

In the long run though, in this particular instance you'd be better off doing sudo -i to get root on a temporary basis, and run the installer from there (i.e: as root).

share|improve this answer
    
It's sudo -i to start a root shell. (-l is for listing the allowed commands) –  grawity Sep 13 '10 at 13:15
    
doh, sorry typo :) –  Sirex Sep 13 '10 at 13:50
add comment

On Ubuntu, you are "supposed" not to need to use the "su" command. Rather than use "su" to get root priviledges until you use the "exit" command, you are supposed to preceed each command with the "sudo" command.

So

$ su

# command1

# command2

# command3

# command4

# exit

$

becomes

$ sudo command1

$ sudo command2

$ sudo command3

$ sudo command4

$

(Note that the prompt changes from "$" to "#" to show that you are root.)

As an alternative, you can use the command "sudo su -" rather than "su" to become root in Ubuntu.

share|improve this answer
add comment

Use sudo su and enter your user password when asked for it.

share|improve this answer
add comment

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.