how to login as a root owner

Asked by Maxboi

When I type in "su" in the Terminal bar, it asks for a password. I know that you are typing it even though it does not show up, for security reasons, but I don't know the password.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Rijckenberg
Solved:
Last query:
Last reply:
Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#1

In order to execute jobs/programs that are normally restricted to the root account, you should use sudo instead of su.

You should never need to use su in Ubuntu.

See here for more info:

https://help.ubuntu.com/community/RootSudo

Revision history for this message
Isabell Long (issyl0) said :
#2

As Mark said above, sudo is the normal method for doing things as root in Ubuntu. The password for sudo is the root password you specified when you installed Ubuntu, the same as it would be if you had to use su.

Revision history for this message
kpk187 (kpk187) said :
#3

If you really need/want su, you could run:

sudo su

You should then be able to use your sudo password to login to the su command.
You may want to try this on a test install (like in a virtual machine), I can't guarantee that it will be safe.

Revision history for this message
Soul-Sing (soulzing) said :
#4

As mark and kpk187 said ubuntu doesn't come with -su as a default option.
Don't use it, try: sudo -i, or gksudo nautilus instead of -su...

Revision history for this message
Tom (tom6) said :
#5

Hi :)

Yes sudo is better for comands that stay in the terminal but anything that brings up a nice gui is better with gksudo otherwise weird permission errors might creep in later on.

Note that sudo uses your own normal user password NOT the SuperUser/Root password. This means that only the true Admin of the system needs to know the SuperSecretRootPassword but all the other normal users can still install programs and sort problems without having to rush off to find the real Admin for the slightest thing. This is quite different from the Windows environment that claims to be secure but keeps dropping people into Admin mode for even trivial issues, and then they wonder why they keep getting so many viruses, malware and general security problems!

Good luck and regards from
Tom :)

Revision history for this message
Maxboi (nathan-isaacson) said :
#6

Hey Tom. Thanks, that helped a lot. Now I know who to refer to if I
have another problem
On Feb 12, 2010, at 4:49 AM, Tom wrote:

> Your question #100570 on gnome-terminal in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/gnome-terminal/+question/100570
>
> Tom proposed the following answer:
> Hi :)
>
> Yes sudo is better for comands that stay in the terminal but anything
> that brings up a nice gui is better with gksudo otherwise weird
> permission errors might creep in later on.
>
> Note that sudo uses your own normal user password NOT the SuperUser/
> Root
> password. This means that only the true Admin of the system needs to
> know the SuperSecretRootPassword but all the other normal users can
> still install programs and sort problems without having to rush off to
> find the real Admin for the slightest thing. This is quite different
> from the Windows environment that claims to be secure but keeps
> dropping
> people into Admin mode for even trivial issues, and then they wonder
> why
> they keep getting so many viruses, malware and general security
> problems!
>
> Good luck and regards from
> Tom :)
>
> --
> If this answers your question, please go to the following page to
> let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+source/gnome-terminal/+question/100570/+confirm?answer_id=4
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/gnome-terminal/+question/100570
>
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Best Mark Rijckenberg (markrijckenberg) said :
#7

@Maxboi: if your password issue is solved, can you set the thread status to 'solved'? Thanks!

Revision history for this message
Maxboi (nathan-isaacson) said :
#8

Thanks Mark Rijckenberg, that solved my question.

Revision history for this message
Fabio Bertacchini (bertfab) said :
#9

When I start Ubuntu with the shell, I see the fabio@fabio-laptop, I write my name fabio wich is
the user the I write when I open the computer. Then I write the password but the computer
give me again fabio@fabio-laptop. So I can't use the terminal but only the applications.
I want to use the terminal because I want to clean the kernel with the command sudo but
I can't.

Revision history for this message
kpk187 (kpk187) said :
#10

@Fabio

You do not need to login when using a terminal window.
The "fabio@fabio-laptop" means that you are already logged in as the user fabio.

If you mean to access a root shell, type "sudo su" and press enter, then type your password (which will not be shown as you type it) and press enter. Please note that:

sudo <command you want to use here without brackets>

Will run the command as the root user.

Revision history for this message
Tom (tom6) said :
#11

Hi :)
Logging in as Root user and trying to run normal daily stuff as Root can create a lot of problems. Typically Windows needs to run everything as Root or allows programs to dip in and out of Root user mode which makes it very vulnerable to malware and other security problems. Also running as Root means that file-permissions are likely to be saved in weird places and with permissions that prevents normal users from being able to access. Ubuntu and other gnu&linux's are designed to be run as normal user with occasional use of sudo for installing programs that you select and other unusual tasks.

Please try to use sudo or gksu instead of always running as Root
https://help.ubuntu.com/community/RootSudo

Of course it is your choice and i initially ignored this sort of advice too but then i had to reinstall Ubuntu a few times and sort out problems running as Root had caused.
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#12

Hi again :)
Ahah, i think i know the problem you are having with sudo!

When you use sudo in front of a command it ask for a password but when you type no stars appear. The keys you press are being logged so if you type your normal user password correctly then the sudoed command will run. If the command is successful then you rarely see any output.

Since no stars appear when you type your password it's even more difficult for people to crack into your system because it's even difficult for them to find out the legth of your password. Knowing password length often makes it fairly trivial to guess someone's password without really trying. eg 8 letters usually means the password is "password", hmm, bad example because that's possibly the commonest password anyway how about 5 letters and the user-name is fabio, then the password is highly likely to be "fabio" too.

So, even tho you don't see stars when typing your password keep typing it and it should work. You might want to test this by trying something trivial that definitely gives you an output, such as

sudo ls

or

sudo dir

Note the "ls" is a lower-case "LS" and should give a list of what is in the folder you are already in.
Good luck and regards from
Tom :)