Tuesday, August 28, 2007

Root Password in Ubuntu

How to change the 'root' password in Ubuntu?
When we are installing Ubuntu it doesn't ask about su (super user) and its password, only user name and password for logging in as a normal user. After installing Ubuntu, when we want to install or access '/', we asked to log in as 'root'. To have full access in Ubuntu, we must logged in or do the commands as 'root' user. What is the default password for 'root'?

As default Ubuntu has no password set for the root user. To gain 'root' access, we just add sudo in front of our commands
e.g. #sudo tar xvfz xampp-linux-1.5.3.tar.gz -C /opt

But sometimes it is disturbing, because after executing commands with sudo added in front of it usually it asked for the password (the same password we have inputted when installing the ubuntu).

Easier option is to log in as 'root' user. Because the default the 'root' user has no password, we can manually set the password by opening the terminal and executing:
$ sudo passwd root
Ok, now you can logged in as root or su.

No comments: