LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-12-2010, 03:37 PM   #1
psychobyte
Member
 
Registered: Sep 2003
Location: Central Coast, California
Posts: 179

Rep: Reputation: 30
passwordless sudo to restart dhcpd


hi,

I'm trying to get sudo allow a passwordless restart/start/stop of dhcpd/bind

I add a user 'rde' to the sudo group
then use visudo to add a line like this...

%rde ALL= NOPASSWD: /etc/init.d/dhcp3-server

when I run

> /etc/init.d/dhcp3-server restart

I get this error which is attributed to not having privs on the .pid file and lease files, etc.

dhcpd self-test failed. Please fix the config file.
The error was:
drop_privileges: could not set group id: Operation not permitted

Now, since using sudo to run that commmand doesn't run that problem, how can I replicate that without requiring a password?

any suggestions are helpful.

Thanks.
 
Old 01-12-2010, 05:24 PM   #2
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 39
So far I remember to add a user you just add the name of the user and if thats a group then add a '%' sign in front of it.
Now as you created a user 'rde' then why there is a % sign in front of it.
Also what the sudo log says.
 
  


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
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 02:36 AM
Does sudo need a restart to work ? sloganyart Slackware 3 12-29-2008 02:52 PM
How to restart dhcpd on another server using SSH? hueofwind Linux - Newbie 17 11-23-2005 07:07 AM
DHCPD startup failure, mdk 9.2, dhcpd v3.0.1rc11 fuzzyworm Linux - Networking 1 02-14-2004 04:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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