Being root

Avi Greenbury avismailinglistaccount at googlemail.com
Wed Jun 24 10:15:41 UTC 2009


bill wrote:
> In unix I am used to logging on as root when I need to do a series of 
> administrative tasks, aware of the danger.
> New to linux, I haven't found a way of logging on as root or su'ing to 
> root. When I installed I did not enter a root password and that makes it 
> difficult to log in.
> 
> How does one set the root password, or is this never done ?
> 

It's only Ubuntu, to my knowledge, which doesn't have a root account 
password set. The vast majority if Linuxen operate as you expect by default.

You have two, non-mutually exclusive, courses of action possible:

1) Sudo. In short, prefix commands with `sudo` to run them as root. This 
requires you be configured as such in /etc/sudoers, which on Ubuntu the 
initial user account is. See `man sudo`, since there's more to it than 
the above.

2) Create a root password and run things as root. Run `sudo passwd` to 
run passwd as root and set the root password. You can then su to your 
heart's desire.

Sudo is lovely and configurable, though reasonably easy to misconfigure, 
but it doesn't preclude also using su. Personally, I use su in general 
and have configured sudo to allow the other users of my systems to run 
particular administrative tasks.


-- 
Avi Greenbury
http://aviswebsite.co.uk ;)
http://aviswebsite.co.uk/asking-questions




More information about the ubuntu-users mailing list