LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-28-2009, 03:02 PM   #1
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Rep: Reputation: 30
sudoers file and no password question


Hi there,
On my ubuntu 8.10 box I belong to the admin group and so have access to sudo and the privileged commands. Here is the line from the sudoers file:

Code:
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
Now I use the mount and umount command frequently to mount various filesystems and drives but am tired of entering the password each time. I tried to modify the sudoers file so I would not need to repeatedly enter my password :

Code:
# User privilege specification
root ALL=(ALL} ALL
unclec ALL=  NOPASSWD: /bin/mount, /bin/umount
Unfortunately, I have had no joy. What would be the best way of doing this ? Note that only me and not other members of the admin group must have the ability to do this.

cheers,
uc
 
Old 04-28-2009, 03:26 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Is (ALL} spelled like that in the real file? It is a syntax error then.
 
Old 04-28-2009, 10:22 PM   #3
ozminh
Member
 
Registered: Aug 2007
Posts: 73

Rep: Reputation: 19
this's mine:

# User privilege specification
root ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
%wheel ALL=(ALL) ALL

# Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL

# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
 
Old 04-28-2009, 11:07 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
I do have line
Code:
raskin ALL= NOPASSWD: /etc/sudo-scripts/setfreq
in sudoers, and it works OK.
 
Old 04-29-2009, 05:35 AM   #5
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by raskin View Post
Is (ALL} spelled like that in the real file? It is a syntax error then.
That was just a typo. I checked the sudoers file again this morning when I booted up my machine and there seems nothing wrong with it. I can mount and unmount without entering the password so I guess rebooting has done the trick.
Thanks for the help anyway !

all good wishes,
UC
 
  


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
Sudoers file no password kamahl Linux - General 5 03-03-2008 09:40 AM
Sudo password for users, a.k.a. sudoers Micro420 Suse/Novell 2 04-21-2006 10:23 PM
A question about the sudoers file... hkl8324 Linux - Newbie 1 01-29-2006 07:08 AM
Samba question, passwords, password file, etc.... Basslord1124 Linux - Networking 3 11-28-2005 04:52 PM
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


All times are GMT -5. The time now is 09:54 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