PDA

View Full Version : [ubuntu] [SOLVED] I can't tell if I am root



go_lanche
June 26th, 2008, 10:45 PM
This is pretty embarrassing to have to ask, but I can't tell if I am root. I had no idea what I was doing when I first installed Ubuntu and now I can't remember what I did.
The user switcher only lists me. I have used
cat /etc/passwd |grep "/home" |cut -d: -f1 and it doesn't list root, but I have to give my own password to do things like sudo and synaptic. Thanks for the help.

PinkFloyd102489
June 26th, 2008, 10:47 PM
It means root doesnt have a password and it's never listed in the user accounts.

Do:

sudo -s

Enter your password and you'll be come root.

rburkartjo
June 26th, 2008, 10:53 PM
go open terminal and type sudo -i it will ask for a password try typing in the password you nomally use. see if this works. if not you will have to type in a root password. here is a link for help
http://www.debianadmin.com/enable-and-disable-ubuntu-root-password.html
/cheesemaker

brian_p
June 26th, 2008, 10:54 PM
This is pretty embarrassing to have to ask, but I can't tell if I am root.


whoami

bodhi.zazen
June 26th, 2008, 11:02 PM
whoami

id

(less typing)

@go_lanche Ubuntu uses sudo and gksu. Use your user password.

community/RootSudo

@PinkFloyd102489


sudo -i:twisted:

PinkFloyd102489
June 26th, 2008, 11:05 PM
id

(less typing)

@go_lanche Ubuntu uses sudo and gksu. Use your user password.

community/RootSudo

@PinkFloyd102489


sudo -i:twisted:


I use sudo -s. It works the same way.

bodhi.zazen
June 26th, 2008, 11:08 PM
I use sudo -s. It works the same way.

No it does not. -s uses your user environmental variables, -i uses root.

Try

sudo -s
echo $HOME

sudo -i
echo $HOME

-i is a tad more secure but more important, IMO, we want root to write config files to /root (for example).

brian_p
June 26th, 2008, 11:33 PM
id

(less typing)

Be fair now! You should compare like with like.


id -un

A draw.

go_lanche
June 27th, 2008, 03:28 PM
Thanks for the help, everything worked out just fine. I tried a couple of the ideas listed here just for curiosity's sake and they were all helpful.