Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 12-19-2004, 03:11 AM   #1
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651

Rep: Reputation: 31
Need help with visudo

I need to edit to sudoers file so mount-usb works with users. As root I'm all done and it works brilliantly (I'll post the whole install steps later, haven't seen anything about it here). Only problem left is that it doesn't work for users. The error must be in my sudoers file, I'm not sure if the lines suggested work on deb:

5) Setup a /etc/sudoers entry for /usr/local/bin/usb-mount
and /usr/local/bin/usb-umount, such as

ALL viking2=NOPASSWD: /usr/local/bin/usb-mount
ALL viking2=NOPASSWD: /usr/local/bin/usb-umount

Replace viking2 with your hostname. Note that these two
lines grant passwordless execution of these two commands as
root - all my users are trustworthy, so I'm happy to do

I tried this but didn't work. How to get there?
Old 12-19-2004, 03:29 AM   #2
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
I've never tried the NOPASSWD option, but I do the same and let a user sudo a mount command. What you are doing is allowing your user(s) to run the usb mounting scripts in /usr/local/bin, you are not allowing them to run the mount command.

What I do to let my user mount the USB drive is to setup the /etc/fstab file as:

/dev/sda1 /mnt/usb vfat user,noauto 0 0

With this I don't need sudo for mounting...

Old 12-19-2004, 05:04 AM   #3
Dead Parrot
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Don't know if this will help, but I've got here a single user machine that lets a normal user, xparrot, to halt and reboot the computer without password. My /etc/sudoers has a line:
xparrot   ALL = (ALL) NOPASSWD: /sbin/halt, /sbin/reboot
And my ~/.bash_profile has these lines:
alias   halt="sudo /sbin/halt"
alias   reboot="sudo /sbin/reboot"


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
Save Visudo and exit acbenny Linux - General 7 05-05-2011 12:33 PM
visudo and pico crud Slackware 3 03-16-2005 04:51 AM
Modifying sudo timeout via visudo jonr Linux - Security 1 08-25-2004 12:25 AM
visudo xviddivxoggmp3 Slackware 7 08-17-2004 08:19 PM
visudo: command not can I find it? mfries Linux - Newbie 2 04-11-2004 07:34 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:12 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
Open Source Consulting | Domain Registration