You are not logged in.

#1 2008-05-06 00:55:08

Dr Small
Member
From: Behind a Terminal
Registered: 2008-03-02
Posts: 59
Website

Sudo problems

I installed and setup sudo per the guide at the wiki, and had sudo working for my account at one time of the day. Then I rebooted, and things started to mess up.

I am part of the wheel group:

wheel video audio optical floppy storage users

And %wheel has been enable in /etc/sudoers:

%wheel  ALL=(ALL) NOPASSWD: ALL

Yet if I run:

sudo visudo

I get:

sudo: visudo: command not found

Apparently it has something to do with a PATH variable, because if I run:

sudo /usr/sbin/visudo

It works perfectly.
So, if anyone can straighten this matter of for me, I would be greatful smile

By the way, I just left Ubuntu for Arch today, so I am a brand new archer!

Dr Small

Offline

#2 2008-05-06 01:17:33

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Sudo problems

Congrats!

You can try:
%wheel  ALL=(ALL) NOPASSWD: SETENV: ALL
instead of the line you posted above. That way, the commands run via sudo will use the environment variables set by the user (you).

Offline

#3 2008-05-06 01:27:03

Dr Small
Member
From: Behind a Terminal
Registered: 2008-03-02
Posts: 59
Website

Re: Sudo problems

Hrm. Well, that didn't work either. Also, this is my $PATH variable:

/home/drsmall/bin:/usr/sbin/:/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:

Offline

#4 2008-05-06 13:25:05

Dr Small
Member
From: Behind a Terminal
Registered: 2008-03-02
Posts: 59
Website

Re: Sudo problems

Where is the default PATH declared at? Because for some reason, "reboot" and "shutdown" do not work, because /sbin is not in my path. This has to be the whole problem with sudo, yet I can not find a solution sad

Offline

#5 2008-05-06 13:27:38

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Sudo problems

Check /etc/profile, that's where the system-wide settings are stored for Bash.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#6 2008-05-06 13:51:32

Dr Small
Member
From: Behind a Terminal
Registered: 2008-03-02
Posts: 59
Website

Re: Sudo problems

I don't have a /etc/profile. But I added:

export PATH=~/bin:/usr/sbin:/sbin:$PATH

To .bashrc, and it seemed to solve the problems smile
Apparently, I forget the export command in front of it, and that was causing problems.

Dr Small

Offline

#7 2008-05-06 14:14:37

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Sudo problems

That's strange, /etc/profile was installed automatically on my system... Perhaps things have changed lately, I don't know.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#8 2008-05-06 14:23:11

Purch
Member
From: Finland
Registered: 2006-02-23
Posts: 229

Re: Sudo problems

You should have /etc/profile if you have filesystem package installed

$ pacman -Qo /etc/profile
/etc/profile is owned by filesystem 2008.03-2

Offline

#9 2008-05-06 14:39:39

Dr Small
Member
From: Behind a Terminal
Registered: 2008-03-02
Posts: 59
Website

Re: Sudo problems

Well, apparently, I don't.

[drsmall@darkghost pixmaps]$ pacman -Qo /etc/profile
error: failed to read file '/etc/profile': No such file or directory

Offline

#10 2008-05-06 16:28:19

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Sudo problems

So

pacman -S filesystem

should do for you.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#11 2008-05-07 00:58:22

Dr Small
Member
From: Behind a Terminal
Registered: 2008-03-02
Posts: 59
Website

Re: Sudo problems

Thanks there. That did the trick smile
/me goes off to explore the unexplored of ArchLinux smile

Offline

Board footer

Powered by FluxBB