LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-21-2005, 12:30 AM   #1
jhigz
Member
 
Registered: Jul 2005
Location: Northern California
Distribution: Debian GNU/Linux
Posts: 32

Rep: Reputation: 15
sudo configuration question


I'm trying to configure sudo so that my user account can perform system/package updates rather than having to be root. I've edited the file as shown below, but as it stands, it will allow my user account to launch the applications listed in the "Cmnd_Alias", but fails to prompt me for my user password before performing the task.

Here's my /etc/sudoers file:

*********************************

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification
Host_Alias PINGSTORM = localhost

# User alias specification
User_Alias UPDATERS = jigs
User_Alias PACKAGERS = jigs

# Cmnd alias specification
Cmnd_Alias CONTROL = /usr/bin/apt-cache, /usr/bin/apt-get, /usr/bin/aptitude
Cmnd_Alias SEEKER = /usr/bin/dpkg, /usr/bin/wget

# User privilege specification
root ALL=(ALL) ALL
jigs PINGSTORM = CONTROL
jigs PINGSTORM = SEEKER

**********************************

When I list the available sudo tasks for my user account, it displays the following:

jigs@pingstorm:~$ sudo -l
User jigs may run the following commands on this host:
(root) /usr/bin/apt-cache, /usr/bin/apt-get, /usr/bin/aptitude
(root) /usr/bin/dpkg, /usr/bin/wget
jigs@pingstorm:~$

I have not used the NOPASSWD tag, so I'm a bit confused as to why it's not requiring me to authenticate my user account with the proper password. I'm hoping someone with more knowledge about sudo can point out the error(s) in my sudoers file and correct the lack of password input.

Thanks for any input...
 
Old 07-21-2005, 04:47 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Try adding the PASSWD attribute.

jigs PINGSTORM = PASSWD: CONTROL
jigs PINGSTORM = PASSWD: SEEKER
 
Old 07-21-2005, 08:43 PM   #3
jhigz
Member
 
Registered: Jul 2005
Location: Northern California
Distribution: Debian GNU/Linux
Posts: 32

Original Poster
Rep: Reputation: 15
Hi leonscape,

Thanks for the reply. I edited the sudoers file to reflect your suggestion and it had no effect on the process. It still allows me to perform the task as my user, "jigs", but without user authentication. I'll continue to digest the 'man sudoers' data to better understand how it works and pay special attention to the defaults within sudo.

Any further suggestions are more than welcome.

Thanks...
 
Old 07-21-2005, 09:18 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
that is odd
try
jigs PINGSTORM = CONTROL PASSWD: ALL
jigs PINGSTORM = SEEKER PASSWD: ALL
 
Old 07-21-2005, 09:30 PM   #5
jhigz
Member
 
Registered: Jul 2005
Location: Northern California
Distribution: Debian GNU/Linux
Posts: 32

Original Poster
Rep: Reputation: 15
Hi foo_bar_foo,

This produces "syntax errors" for those two lines within the sudoers file...
 
Old 07-23-2005, 08:23 AM   #6
jhigz
Member
 
Registered: Jul 2005
Location: Northern California
Distribution: Debian GNU/Linux
Posts: 32

Original Poster
Rep: Reputation: 15
Update / Solved

Sudo is now requiring my user account to authenticate as expected. I had added my user “jigs” to the sudo group shortly after installing Sarge. Apparently, sudo doesn't require a password from users who are in the 'sudo' group (thanks Lacek for pointing this out). Once I removed my user from the sudo group, everything behaved as expected.

Also, thank you leonscape and foo_bar_foo for your input.
 
  


Reply



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
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
sudo mv question howarddevore Linux - General 5 08-16-2005 11:59 AM
Sudo question satimis Fedora 6 11-24-2004 08:58 PM
Sudo question. wbdune Linux - Newbie 2 10-14-2003 12:40 AM
sudo question darthtux Linux - General 1 06-07-2002 02:27 AM

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

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