LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 11-23-2005, 10:43 AM   #1
clickster
LQ Newbie
 
Registered: Dec 2004
Posts: 22

Rep: Reputation: 15
sudoers question


I am trying to set up sudo for a user account. I need the account to be able to run smbmount/smbumount to mount/unmount anything without having to enter a password. I have created the following command alias:

Cmnd_Alias MOUNTS = /usr/bin/smbmount, /usr/bin/smbumount

I have then added the following line for the user:

username ALL=NOPASSWD: MOUNTS

If I just run smbmount, it works in as far as it gives me a list of options for smbmount (if I take the line out of sudoers, it prompts for a password). However, once I add options, such as "sudo smbmount //server/share /local/dir" it prompts for a password. I've also tried it by listing out the commands rather than using a command alias with the same result. The problem seems to be with the way it deals with switches/options. I don't know all of the mounts the user will be using, so I can't simply list them all out in the sudoers file. How can I tell it to accept all switches along with the command itself? Any help would be greatly appreciated.
 
Old 11-24-2005, 05:47 AM   #2
slano
Member
 
Registered: May 2003
Distribution: slack,gentoo
Posts: 57

Rep: Reputation: 16
I don't know exact answer for you question, but maybe you should try adding SUID bit (chmod 4755) to smbmount, smbumount executable, and make sure users are able to run it, and they will be able to run it with root permissions, therofre will be able to mount/unmount shares.
Hope it helps
 
  


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
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 06:03 PM
Regarding SUDOERS hinetvenkat Linux - Networking 1 09-02-2005 02:47 PM
sudoers???? yenonn Slackware 6 02-10-2004 04:09 AM
Sudoers Fonke0412 Linux - Newbie 3 08-10-2003 04:54 PM
sudoers........ help linuxlah Linux - General 4 01-15-2003 12:54 AM


All times are GMT -5. The time now is 01:23 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration