Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sudo help
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tom56
Guru
Guru


Joined: 27 Apr 2004
Posts: 325
Location: united kingdom

PostPosted: Tue Feb 01, 2005 5:20 pm    Post subject: sudo help Reply with quote

I added this line to /etc/sudoers
Code:
%wheel  ALL=(ALL)       ALL

So that those in the wheel group could use sudo. However, it isn't asking for a password when I run sudo. Obviously this is very worrying. Does anyone know why this might be happening? Thanks,

Tom.
_________________
"A million surplus Maggies are willing to bear the yoke; And a woman is only a woman, but a good cigar is a Smoke" -- Rudyard Kipling (on why he chose cigars over his wife)
Back to top
View user's profile Send private message
mpsii
l33t
l33t


Joined: 11 Mar 2003
Posts: 658
Location: Jackson, TN

PostPosted: Tue Feb 01, 2005 6:19 pm    Post subject: Reply with quote

Not entirely sure if this is required or not, but I have always used visudo to edit the /etc/sudoers file rather than manually editing it.

Is that line in the /etc/sudoers file twice and uncommented twice?
_________________
-----------------------------------------
Michael
Back to top
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Tue Feb 01, 2005 8:17 pm    Post subject: Reply with quote

The file used to have a comment about this "feature." Personally I have it enabled, because I'm stupid and lazy, but I do remember consciously choosing this.
_________________
s/(?<!gnu\/)linux(?! kernel)/GNU\/Linux/gi

Don't blame me. I didn't vote for him.

http://john.simplykiwi.com
Back to top
View user's profile Send private message
tom56
Guru
Guru


Joined: 27 Apr 2004
Posts: 325
Location: united kingdom

PostPosted: Wed Feb 02, 2005 6:04 pm    Post subject: Reply with quote

Code:

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# User privilege specification
root    ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
%wheel        ALL=(ALL)       ALL

# Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now


Here's my sudoers file. I edited by doing visudo but it didn't make a difference.

EDIT: Weird. It's suddenly working again now, even though I haven't done anything. Thanks for the help anyway!
_________________
"A million surplus Maggies are willing to bear the yoke; And a woman is only a woman, but a good cigar is a Smoke" -- Rudyard Kipling (on why he chose cigars over his wife)
Back to top
View user's profile Send private message
mpsii
l33t
l33t


Joined: 11 Mar 2003
Posts: 658
Location: Jackson, TN

PostPosted: Wed Feb 02, 2005 6:13 pm    Post subject: Reply with quote

This is the only difference between my file and yours:
Code:
# Defaults specification
Defaults targetpw            # ask for the password of the target user i.e. root
%users ALL=(ALL) ALL     # WARNING! Only use this together with 'Defaults targetpw'!

_________________
-----------------------------------------
Michael
Back to top
View user's profile Send private message
RuiP
l33t
l33t


Joined: 15 Jan 2005
Posts: 643

PostPosted: Mon Feb 07, 2005 11:57 pm    Post subject: Reply with quote

Hi,
I cannot use sudo to launch X apps. Is this normal with gentoo?
I always had used sudo to launch leafpad or gedit as root on other distros.
(Now i get this: "Gtk-WARNING **: cannot open display:" error. And gksudo gives me the same after a message windows saying "Child terminated with 1 status")

How can i get that behavier with gentoo? Is possible? just a permission setting or a configuration change?

many thanks for advices.
Back to top
View user's profile Send private message
humph
n00b
n00b


Joined: 27 Apr 2004
Posts: 3

PostPosted: Wed Feb 16, 2005 8:04 pm    Post subject: Reply with quote

RuiP wrote:
Hi,
I cannot use sudo to launch X apps. Is this normal with gentoo?
I always had used sudo to launch leafpad or gedit as root on other distros.
(Now i get this: "Gtk-WARNING **: cannot open display:" error.

I had this problem either.
Solution (without a clue what possible security holes are coming up with this one):
in /etc/sudoers comment out the following line
Code:
Defaults env_reset


Happy hacking!
Humph
Back to top
View user's profile Send private message
RuiP
l33t
l33t


Joined: 15 Jan 2005
Posts: 643

PostPosted: Thu Feb 17, 2005 12:55 am    Post subject: Reply with quote

humph wrote:

Solution (without a clue what possible security holes are coming up with this one):
in /etc/sudoers comment out the following line
Code:
Defaults env_reset


Happy hacking!
Humph


Hi humph,
thanks, for that. I had never seen that line in any sudoers file of none of the linuxs i tried!
Strange enough is not clear what it does but don't have any coment about It on file...

Any way, the securitty hole seems to be the other way around. Doing su leaves you on command line until you type exit... so is dangerous the sudo, and with gentoo sudo -c gedit somefile, opens gedit but NOT somefile... whitch is unconfortable.

anyway that was your first post and you are answering not question, so,
congratulations and Welcome.
_________________
ESTRAGON: We've lost our rights?
VLADIMIR: (distinctly) We got rid of them.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum