View Full Version : sudo on Debian
cl333r
December 3rd, 2008, 04:49 PM
Hi folks,
While installing Debian (stable and testing) it asks for a root and for a user password. But when I try to do anything as root I'm being told that I'm not part of the "sudoers".
Is there any point and click solution to be able to use sudo as in our (much) more user-friendly Ubuntu?
cmay
December 3rd, 2008, 05:26 PM
no. not point and click. but its easy to edit to sudoers file.
i have a tread on it in the debian subforum. i am a open solaris live cd right now and i cant exactly remember the right path to the file . search the debian sub forum or my older posts and there is a perfect explaination and example.
hope it helped .
cmay
December 3rd, 2008, 06:56 PM
i forgot.
open terminal and type visudo.
then edit the sudoers file.
save by pressing f2 (your using nano)
and that is it.
mine looks like this.
root=ALL(ALL)ALL
cmay=ALL(ALL)ALL
at least this is how i remember it to be.
K.Mandla
December 3rd, 2008, 08:16 PM
Moved to Debian subforum.
nvteighen
December 4th, 2008, 01:42 PM
Don't forget to look at:
man sudoers
markharding557
December 7th, 2008, 08:19 PM
just open a root terminal or use gksu sudo is not needed
kerry_s
December 7th, 2008, 09:04 PM
just open a root terminal or use gksu sudo is not needed
some people prefer sudo as it is safer, my root is locked(sudo passwd -l root). 1 of the first things i do on my debian install is change it to sudo, by adding myself to sudoers and the changing gksu(gksu-properties).
dizee
December 10th, 2008, 12:04 AM
I much prefer to use sudo, out of habit more than anything. I have a habit of changing to root so often to do things such that su becomes annoying with its extra requirement to enter the username. It'd work well if you did all your admin stuff at the same time, though.
del_diablo
December 10th, 2008, 12:11 PM
What is it with you people? You only need to type su once, unless you close down the terminal.
user~ su
password:
user#
*sig*
basenvironment
December 10th, 2008, 07:47 PM
tabbed terminal....
tab1 - su to root
tab2 - user
minimize to taskbar
):P
dizee
December 12th, 2008, 12:07 AM
What is it with you people? You only need to type su once, unless you close down the terminal.
user~ su
password:
user#
*sig*
Yeah, but the idea of leaving an open root terminal worries me.
Knowing me I'd go to delete something and do some serious damage by accidentally picking the wrong terminal window.
Besides, I'm used to sudo.
polmir
December 20th, 2008, 06:49 PM
Another way to run programs as root.
Type in user terminal:su-to-root -c /path/to/program
For example:yy@xx:~$ su-to-root -c /usr/sbin/synaptic
About to execute synaptic.
This command needs root privileges to be executed.
Using su...
Enter root password at prompt.
Password:
oryy@xx:~$ su-to-root -c synaptic
About to execute synaptic.
This command needs root privileges to be executed.
Using su...
Enter root password at prompt.
Password:
or
yy@xx:~$ su-to-root -c gedit
About to execute synaptic.
This command needs root privileges to be executed.
Using su...
Enter root password at prompt.
Password:
shadylookin
December 28th, 2008, 10:03 PM
go into the terminal
su
enter password
visudo
you'll see something that looks like this
# User privilege specification
root ALL=(ALL) ALL
add your usersname ALL=(ALL) ALL under root like this
# User privilege specification
root ALL=(ALL) ALL
YOUR_USERNAME_HERE ALL=(ALL) ALL
hit ctrl+o
write to /etc/sudoers
ctrl+x
and now you can use sudo
CREEPING DEATH
January 23rd, 2009, 05:30 AM
When INSTALLING Debian (I've only done this with the old-style blue-screen installer), press Esc when it asks for a root password. It will then take you back to the menu. Press Enter. When it asks about Root, tell it "No". It will then set up as Sudo.
This isn't always an option, some (recent, but obsoleted) versions of D-I don't allow it.
CD
Frak
January 24th, 2009, 10:56 PM
Here's a simple string that you can use
su -
echo 'loginname ALL=(ALL) ALL' >> /etc/sudoers
Loginname is your login name; mine would be frak
Close the terminal, go back into the terminal, and you should be able to use sudo.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.