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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-21-2005, 12:30 AM
|
#1
|
Member
Registered: Jul 2005
Location: Northern California
Distribution: Debian GNU/Linux
Posts: 32
Rep:
|
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...
|
|
|
07-21-2005, 04:47 PM
|
#2
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
Try adding the PASSWD attribute.
jigs PINGSTORM = PASSWD: CONTROL
jigs PINGSTORM = PASSWD: SEEKER
|
|
|
07-21-2005, 08:43 PM
|
#3
|
Member
Registered: Jul 2005
Location: Northern California
Distribution: Debian GNU/Linux
Posts: 32
Original Poster
Rep:
|
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...
|
|
|
07-21-2005, 09:18 PM
|
#4
|
Senior Member
Registered: Jun 2004
Posts: 2,553
Rep:
|
that is odd
try
jigs PINGSTORM = CONTROL PASSWD: ALL
jigs PINGSTORM = SEEKER PASSWD: ALL
|
|
|
07-21-2005, 09:30 PM
|
#5
|
Member
Registered: Jul 2005
Location: Northern California
Distribution: Debian GNU/Linux
Posts: 32
Original Poster
Rep:
|
Hi foo_bar_foo,
This produces "syntax errors" for those two lines within the sudoers file...
|
|
|
07-23-2005, 08:23 AM
|
#6
|
Member
Registered: Jul 2005
Location: Northern California
Distribution: Debian GNU/Linux
Posts: 32
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 01:53 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|