Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old November 26th, 2004   #1
UnixDaemon
First Cup of Ubuntu
 
Join Date: Nov 2004
Location: Minnesota, USA
Beans: 7
Send a message via MSN to UnixDaemon
HOWTO: Use normal root instead of Sudo

I'm sure theres probably a howto something like this already laying around somewhere on the forums, but for you people who want classic root access by just using the su command and typing in your password instead of using sudo commands, just do this on the command line:

Code:
sudo passwd
Now you will need to type in your account password to login to root of course like normal sudo commands in Ubuntu.

After you do that it'll prompt you with this:

Code:
Enter new UNIX Password:
enter the password you want in there for root access. Then it'll prompt you with this:

Code:
Retype new UNIX password:
Just type the same password you typed above of course, hit enter and it should say:

Code:
passwd: password updated successfully
Now you should be able to type in su and the password you just put in and you should now have old styled root access for those who don't like Ubuntu's sudo commands
UnixDaemon is offline   Reply With Quote
Old November 26th, 2004   #2
p!=f
Dipped in Ubuntu
 
p!=f's Avatar
 
Join Date: Oct 2004
Location: Prague, Czechia
Beans: 437
Kubuntu 7.10 Gutsy Gibbon
Send a message via ICQ to p!=f
Re: HOWTO: Use normal root instead of Sudo

http://www.ubuntulinux.org/support/d...ation/faq/root

If you want to use su, typing "su -" may save you some headaches.
__________________
"Linux is like a wigwam. No Windows, no Gates and Apache inside!" - Unknown

RFC 3092 - Etymology of "Foo"
p!=f is offline   Reply With Quote
Old November 29th, 2004   #3
mongolito404
Spilled the Beans
 
mongolito404's Avatar
 
Join Date: Nov 2004
Location: Belgium
Beans: 10
Re: HOWTO: Use normal root instead of Sudo

You can also use
Code:
sudo su -
to get into a root shell
mongolito404 is offline   Reply With Quote
Old December 13th, 2006   #4
lmo
5 Cups of Ubuntu
 
lmo's Avatar
 
Join Date: Dec 2006
Beans: 20
Ubuntu 6.06 Dapper
Re: HOWTO: Use normal root instead of Sudo

linux administrator needs root/su sometimes.

Add a root password using sudo (or by some means)
sudo passwd root
password: [my_secret]
Enter new UNIX password: [roots_secret]
Retype new UNIX password: [roots_secret]
passwd: password updated successfully


Become root
su
Password: [roots_secret]


Fix invalid MIT-MAGIC-COOKIE-1

Add the following 2 lines to /root/.bashrc
DISPLAY=:0.0
export DISPLAY


'Steal' a user .Xauthority file
by adding the following 2 lines to /root/.bashrc
XAUTHORITY=/home/[some_user]/.Xauthority
export XAUTHORITY


Link /usr/X11R6/bin/xauth (stupidly missing for gksu in dapper)
ln -s /usr/bin/xauth /usr/X11R6/bin/xauth


Make gksu act like su
gconf-editor
apps -> gksu
uncheck sudo-mode


Now I can login as root on the text console (ctrl-alt-F1),
use su, use gksu, gksudo, run gvim (Yea!)


My 2 cents:
'sudo rm -r /*' is as effective for total destruction as su.
sudo safety is imaginary.
sudo has its gotchas.
not everything works with sudo the same way it does with su.
sudo is cool for its purposes, but it doesn't replace su.
sudo is ok, and linux as linux with root is ok.
nobody make me believe that linux does not need su/root sometimes.

Last edited by lmo; December 13th, 2006 at 11:36 PM..
lmo is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:45 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry