Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

gksudo executes command before asking for password

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
simen
Posts: 203
Joined: 2005-07-02 15:00
Location: Norway

gksudo executes command before asking for password

#1 Post by simen »

Hello people,

On my roundabout path from hack to (presumably) hacker, I've pieced together some shell scripts to control my firewall. I suspect they are too ugly for words, suffice to say that they work. :roll:

My problem is with gksudo. I want to be prompted for a password to run /usr/local/sbin/openwall; the relevant parts of my sudoers file look like this:

Code: Select all

# Cmnd alias specification
Cmnd_Alias	CLOSE =  /usr/local/sbin/closewall
Cmnd_Alias	OPEN = /usr/local/sbin/openwall

# User privilege specification
root	ALL=(ALL) ALL
simen   ALL=NOPASSWD: CLOSE
simen	ALL= OPEN
If I do "sudo openwall" in a terminal, all is well. But if I do "gksudo openwall", my computer FIRST executes the shell script, THEN prompts me for my password, and if I verify myself, it runs the script one more time before exiting. For what it's worth, I'm running Sarge and obviously GNOME. What am I missing here?

Kind regards,
--Simen

Post Reply