LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-11-2007, 11:48 AM   #1
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Rep: Reputation: 31
Sudo Wildcard


Hi - I'm trying to create a sudo entry to allow the user "ropuser" to run the chfn command...so far I have

ropuser ALL=(root)NOPASSWD:/usr/bin/chfn -f [!;]* [!;]*

I'm trying to use the wildcards to disallow the use of the ; character, running any command as root. bad. I'm new to this wildcard thing, and it doesn't work. Anyone know the syntax for this?

Thanks,

Scott K Logan
 
Old 06-11-2007, 05:32 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
Not sure if the wildcard options are needed or whether sudo understands them. I kind of use a simply line like this.
ropuser ALL=NOPASSWD: /usr/bin/chfn

The use of ; seperate for addition commands. The way you have may be confusing even though in brackets.

Brian
 
Old 06-11-2007, 07:11 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
If a user included a semicolon, it will be included in the GEOS file and not execute the command after the semicolon.

You might want to use %u in the argument however to allow the user to change his own GEOS information but not that of other users. So the command is run a root, but can only be run to change the users own GEOS field. You might also use "-- %u" so that the user entry can't be hidden by making it an argument to another option.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
wildcard SSL - dedicated IP chack Linux - General 1 03-20-2007 10:48 PM
Using wildcard characters mlink4 Red Hat 1 01-26-2007 05:06 AM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
I choose you wildcard! tearinox Linux - Newbie 2 01-23-2004 08:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration