You are not logged in.

#1 2007-12-11 04:13:02

fluxme
Member
Registered: 2007-12-05
Posts: 36

How do I get sudo to work?

Hello,
new Arch-user here.

Since I personally think that logging in to root, execute a command and then return to my own account is quite a hassle, I'm fond of using the sudo-program.
Unfortunately it does not work.

For instance, if I wright "sudo packman -S package_name", I get the usual warnings and comments, type in my password and then nothing happens! The prompt is returned to me, but the command is not executed.
So I figured maybe I had to do some configuring?
su root works at least, but I really want sudo to work too.

I'd really appreciate some help about this one smile

Flux

Offline

#2 2007-12-11 04:16:13

Jessehk
Member
From: Toronto, Ontario, Canada
Registered: 2007-01-16
Posts: 152

Re: How do I get sudo to work?

Edit /etc/sudoers appropriately as root to add either your specific user or the entire wheel group.
The file is well commented -- it should be fairly straightforward to do. smile

Last edited by Jessehk (2007-12-11 04:17:50)

Offline

#3 2007-12-11 04:18:33

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,686

Re: How do I get sudo to work?

Here's a link to the wiki page on it:

http://wiki.archlinux.org/index.php/Sudo


oz

Offline

#4 2007-12-11 12:35:50

fluxme
Member
Registered: 2007-12-05
Posts: 36

Re: How do I get sudo to work?

Thanks, finally got it to work smile

Offline

#5 2007-12-11 14:03:05

Bison
Member
From: Jacksonville, FL
Registered: 2006-04-12
Posts: 158
Website

Re: How do I get sudo to work?

I think you generally want to use visudo instead of editing the file directly

Offline

#6 2007-12-11 14:08:28

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: How do I get sudo to work?

Bison wrote:

I think you generally want to use visudo instead of editing the file directly

Yes! visudo is the preferred method. Otherwise, there is a risk of corrupting the file if extra spaces are added to the end, or so I am told.

Offline

#7 2007-12-11 14:31:53

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: How do I get sudo to work?

That's not compulsory to use vi-like editor, just it can be use any editor and to be sure that there aren't errors, checked by visudo -c.

F


do it good first, it will be faster than do it twice the saint wink

Offline

#8 2007-12-11 15:36:27

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: How do I get sudo to work?

TheSaint wrote:

That's not compulsory to use vi-like editor, just it can be use any editor and to be sure that there aren't errors, checked by visudo -c.

F

HUH???

But, then I did a...

man visudo

and found this...

visudo accepts the following command line options:

       -c  Enable check-only mode.  The existing sudoers file will be checked
           for syntax and a message will be printed to the standard output
           detailing the status of sudoers.  If the syntax check completes
           successfully, visudo will exit with a value of 0.  If a syntax
           error is encountered, visudo will exit with a value of 1.

Now I get it, thanks for the broken english tip. smile

Offline

#9 2007-12-11 22:15:48

fluxme
Member
Registered: 2007-12-05
Posts: 36

Re: How do I get sudo to work?

Thanks for the tips. I followed the wiki and therefore used the visudo-command, but I have to say I prefer nano over vi, at least at the moment.

Offline

#10 2007-12-12 00:14:31

osc~
Member
From: brazil
Registered: 2007-07-06
Posts: 117
Website

Re: How do I get sudo to work?

this post helped me alot
i was about to write one similar.
i have one question though?
what is the advantage of sudo over adding a user in all the /etc/group file.
maybe this should be in another post
thanks

Offline

Board footer

Powered by FluxBB