Results 1 to 8 of 8
Hi, I tryed to work with sudo for Quite a while now.
I thought I understood how it worked.
But I just figured out I was wrong..
Anywho, I cant ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-31-2007 #1
Problems with Sudo Config
Hi, I tryed to work with sudo for Quite a while now.
I thought I understood how it worked.
But I just figured out I was wrong..
Anywho, I cant make that part with the % groups work..
So my sudoers file is this:
I tryed to make a new group and then run adduser with the -g ### parameter.Code:Host_Alias LOCAL = 127.0.0.1 Cmnd_Alias SCRIPT = /bin/mount, /usr/sbin/chroot Cmnd_Alias NOT = /bin/halt #Now a part I dont even get.. :S Defaults requiretty Defaults env_reset Defaults env_keep = "(lots of env Variables here)" #At this point I start understanding it again. root ALL=(ALL) ALL %users LOCAL = NOPASSWD: SCRIPT %users LOCAL = !NOT
That didnt work.
So, well the group users is everybody right?
Well, I make users now with adduser -m $NEWUSERNAME
Why doesnt it work?
Why cant I use the sudo command with every new user?
Well, thanks alot.
Cheers,
Robin
- 11-02-2007 #2
Bump

I tryed a couple of things.
I know for sure that the user is in the Group. Since I did that with webmin.
But I still get, User: isn't allowed to do..
Oh, and when i do sudo -l I get a password prompt
And then I get user isnt allowed any command.
- 11-22-2007 #3Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
sudo, incredibly useful and a pain in the a$$ at the same time

%users is an example, refering to the group users.
You could add everyone to the users group.
This should give you a list of users on the system
If your happy with that list do the following to add them all to the users group.Code:# cat /etc/passwd | awk 'BEGIN {FS=":"} {if ($3>499) print $1;}'
Code:# for i in $(cat /etc/passwd | awk 'BEGIN {FS=":"} {if ($3>499) print $1;}'); do usermod -G users $i; done;RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 11-22-2007 #4Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
Oh, if your using samba and machine accounts change the awk script to this one which ignores usernames ending with a $
Code:awk 'BEGIN {FS=":"} {if ($3>499) if ($1 !~ /\$+$/) print $1;}'RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 11-22-2007 #5
- 11-22-2007 #6Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
No problem, what solution did you come up with in the end?
RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 11-22-2007 #7
- 11-22-2007 #8Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
Indeed! LMAODont use SUDO :PRHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.


Reply With Quote
