Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 11-23-2005, 09:43 AM   #1
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:


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, 04:47 AM   #2
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


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 05:03 PM
Regarding SUDOERS hinetvenkat Linux - Networking 1 09-02-2005 01:47 PM
sudoers???? yenonn Slackware 6 02-10-2004 03:09 AM
Sudoers Fonke0412 Linux - Newbie 3 08-10-2003 03:54 PM
sudoers........ help linuxlah Linux - General 4 01-14-2003 11:54 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:41 PM.

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