Gavitor
Posts: 1
Joined: Sat Jan 26, 2013 4:30 am

Password for ROOT account

Sat Jan 26, 2013 4:34 am

HI all,

A simple question. What is the password for the root account
on the RaspberryPi? I'm sick of using 'sudo'.

Any assistance would be appreciated.

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Password for ROOT account

Sat Jan 26, 2013 8:15 am

On Debian , the root account has no password.
If you insist :

Code: Select all

sudo passwd root
will set one.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Password for ROOT account

Sun Jan 27, 2013 2:56 am

after installing the sudo package running arch, I can enter the following and it prompts me just once for the root password, and then I am running as root and do not have to use sudo.

su root

I do not know if you can do that with your system, but you could try. It opens another shell with root permission for me, and when I exit, it puts me back in my main login shell.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

Re: Password for ROOT account

Sun Jan 27, 2013 3:29 am

sdjf wrote:after installing the sudo package running arch, I can enter the following and it prompts me just once for the root password, and then I am running as root and do not have to use sudo.
su root
Why did you even install sudo, if you want to use su instead?

The situation in the Foundation's images is not that su does not work, but that the root password is not pre-set. Hence the answer above yours.

You do not actually need a root password if sudo is configured. Then "sudo su" is the same as your command.

DBryant
Posts: 281
Joined: Sat Feb 02, 2013 12:41 pm
Location: Berkshire, UK

Re: Password for ROOT account

Sat Feb 02, 2013 7:17 pm

By far the easiest way is to execute:
sudo bash

You will be prompted for your password once adnthen you enter a sheel where you can run as many 'root' commands as you like. When you're done type exit.

The overhead is no greater than enabling the root account.

Return to “Beginners”