Ubuntu Forums Archive Viewer

sudo on Debian

Archived thread 1001069 from Debian. Markdown source: Debian/thread_1001069_sudo_on_Debian.md

Original URL About this archive
#1

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?

#2

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 .

#3

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.

#4

Moved to Debian subforum.

#5

Don't forget to look at:


man sudoers
#6

just open a root terminal or use gksu sudo is not needed

#7

markharding557 said: 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).

#8

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.

#9

What is it with you people? You only need to type su once, unless you close down the terminal.

user~ su password: user#

*sig*

#10

tabbed terminal....

tab1 - su to root tab2 - user

minimize to taskbar

):P

#11

del_diablo said: 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.

#12

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:

or``` yy@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:

#13

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

#14

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

#15

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.