Thread: root password
View Single Post
Posts: 515 | Thanked: 266 times | Joined on Nov 2009 @ Oelsted, Denmark
#30
Here's a guide for getting "Ubuntu-like sudo behaviour":

Create the new sudo rule:
Code:
root
echo "user ALL=(ALL) ALL" > /etc/sudoers.d/custom-user.sudoers
update-sudoers
Set user password:
Code:
passwd user
After this You can close the terminal and uninstall the rootsh package. Or just remove it using:
Code:
apt-get remove rootsh
Close the terminal and open a new one or exit out of the root shell using 'exit' or Ctrl-D.

To become root now type (enter Your 'user' password):
Code:
sudo su -
(Doing it this way there is no need to run sudo before commands if You've switched to root first)

Or if You just want to run a single command as root type (enter Your 'user' password):
Code:
sudo <command>
Oh, and Merry X-Mas BTW...
__________________
Christian Wilken - tux-POWER.dk!
... May the Source be with You ...

Last edited by DrWilken; 2010-12-24 at 14:17. Reason: Forgot to run 'update-sudoers'
 

The Following 3 Users Say Thank You to DrWilken For This Useful Post: