-1

I am running Ubuntu on beagleboard xm. THe default username and password are 'ubuntu' and 'temppwd' respectively. I wanted to know how can i change the default user to 'root' and password accordingly?

1 Answer 1

0

You don't switch username to root. The root user is in the system, but with Ubuntu, you rarely use the root user directly, but rather select one or more users who can act as root, by using commands like sudo.

With Ubuntu the first user always has that capability. So in your case, if you want a root shell, you can enter sudo -s. You'll then be asked for your password and you'll enter "temppwd". But it's better to run commands with sudo directly, such as sudo cat /var/log/auth.log, because then you'll be able to see who controlled the root user in a specific way. For instance, this is the last log entry in my auth.log:

Jun 9 09:09:15 jedesktop sudo: jo-erlend : TTY=pts/2 ; PWD=/home/jo-erlend ; USER=root ; COMMAND=/bin/cat /var/log/auth.log

Having different users control the root user elimintates the need to share passwords and it provides more fine grained control of rights. However, if you do want people to log in as root, you can activate the root user by giving it a password, using the command sudo passwd root.

But what you'll most likely want to do, is to add a new user, make this user a "sudoer" and then remove the ubuntu user from your system. A user becomes a sudoer if you add it to the "sudo" group on modern versions or "admin" on older versions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .