You might want to check out the RootSudo page at the Ubuntu Documentation, if you haven't already.Cheemag wrote: Who says you can't be root with a persistent live session on a key? o)
Done by generating a root console launcher with gnome-terminal -e 'sudo - su'Code: Select all
________________________________________ ( Celebrate Hannibal Day this year. Take ) ( an elephant to lunch. ) ---------------------------------------- o o ___ {~._.~} ( Y ) ()~*~() (_)-(_) mint mint # whoami root mint mint # ls Desktop Documents Downloads Music Pictures Public Templates Videos mint mint # cd / mint / # ls bin cdrom etc initrd.img media opt rofs sbin srv tmp var boot dev home lib mnt proc root selinux sys usr vmlinuz mint / #
Whether I can actually DO anything remains to be be seen - best not mess around
in root.
https://help.ubuntu.com/community/RootSudo
Including the area "Special notes on sudo and shells."
There I found a link to this table, which might (or might not) explain some things:
Code: Select all
Here is a summary:
Code:
corrupted by user's
HOME=/root uses root's PATH env vars
sudo -i Y Y[2] N
sudo -s N Y[2] Y
sudo bash N Y[2] Y
sudo su Y N[1] Y
[1] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
probably set by /etc/environment
[2] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
The bottom line, is "sudo -i" is the proper command to run when you want a root shell that is untainted by the user's environment.
Code: Select all
sudo -i
Code: Select all
gnome-terminal -e 'sudo - su'
I really prefer to stick with the recommendations in Ubuntu's RootSudo documentation and simply use sudo or gksudo when I need root access, but I guess there's no reason you can't use one of those other commands to get yourself a root prompt.