LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Allow Root to log in in ubuntu (https://www.linuxquestions.org/questions/linux-general-1/allow-root-to-log-in-in-ubuntu-542789/)

hallows1 04-02-2007 06:31 PM

Allow Root to log in in ubuntu
 
I am needing to log in as root to do some stuff, can anyone please assist me in how i would go about enabling root to log in via the graphical interface please

Peacedog 04-02-2007 06:51 PM

If you're using gnome this may help.

http://ubuntuguide.org/wiki/Ubuntu_E...gin_into_GNOME

Good luck.

Wim Sturkenboom 04-02-2007 11:29 PM

By default the root account has a password that is difficult to guess. Instead of using root, you can sudo your commands (it will prompt you for YOUR password).

To set the password for root, type the below in a terminal
Code:

sudo passwd root
and specify the root password.

pixellany 04-03-2007 08:15 AM

Quote:

By default the root account has a password that is difficult to guess
By default, Ubuntu has NO root password---ie the account is disabled.

Note: You may also want to enable the GUI root login. (Although most will tell you this is really bad idea). This is done in the config menus--I think it called login manager....

Walman 04-03-2007 04:09 PM

You could login as root

issue the command "sudo passwd root"
Type your passwd if you are root , it might ask this twice

The when you su - root always use the passwwd above

Zention 04-03-2007 06:25 PM

I would be quite interested to know how they disabled the root account.

I suspect it just is random password set.

ps -ef | grep root would show quickly if the account has been disabled or not.

Wim Sturkenboom 04-03-2007 11:25 PM

That is what I thought, but pixellany corrected me. The answer might be in the passwd man page.
Quote:

User accounts may be locked and unlocked with the -l and -u flags. The -l option disables an account by chang*ing the password to a value which matches no possible encrypted value. The -u option re-enables an account by changing the password back to its previous value.
Wonder how they achieve the latter unless a copy is stored somewhere.

pixellany 04-04-2007 01:56 AM

Quote:

Originally Posted by Wim Sturkenboom
That is what I thought, but pixellany corrected me. The answer might be in the [i]passwd[i/] man page.
Wonder how they achieve the latter unless a copy is stored somewhere.

But pixellany might well be wrong....:rolleyes:

After my other post, I realized that I did not have absolute detailed knowledge of what happens.

How DO you disable an account? Can you tell from /etc/passwd if it is disabled?

runnerfrog 04-04-2007 03:51 AM

Quote:

Originally posted by pixellany:
How DO you disable an account? Can you tell from /etc/passwd if it is disabled?
Yes, you can if the root line in /etc/passwd looks like this:

root:x:0:0:root:/root:/sbin/nologin

Then the account is disabled, but sudo and other apps that do not require access to the shell can still access the root account.

It is reenabled when you change /sbin/nologin to /bin/bash or another shell, but the great thing to me still is which is the password... ubuntu, may be? I've seen many Ubuntu's that doesn't ask you for root password, so, it is disabled AND passwordless, may be?

EDIT: An empty /etc/securetty file prevents root login from any device too.


All times are GMT -5. The time now is 08:50 PM.