sudo and privoxy
fatkasuvayu+linux at gmail.com
Wed Apr 8 22:06:57 UTC 2009
2009/4/8 Beartooth <Beartooth at comcast.net>:
> On Wed, 08 Apr 2009 14:37:52 -0600, Frank Cox wrote:
>> Add this to /etc/sudoers (using visudo)
> Aaarrghghgh. All I know about vi is how to spell it, and I'm not
> always too sure of that. Nor does the man page for visudo look any
> It let me open it with nano -w; but sure enough, there it stands,
> bold as brass, big as life, and twice as ornery : "## This file must be
> edited with the 'visudo' command." Methinks I am undone.
>> username ALL=NOPASSWD: /sbin/service privoxy restart
>> Substitute the name of the user that you want to give this permission to
>> for "username" in the above line.
>> Now he/she can simply type "/sbin/service privoxy restart" at a
>> commandline (or you can even hang it on an icon) and restart privoxy.
> I did try :
> [root at Hbsk2 etc]# nano -w sudoers
> [root at Hbsk2 etc]#
> and added the line onto the bottom; but then I got :
> [tslg at Hbsk2 ~]$ /sbin/service privoxy restart
> Can't find /usr/sbin/privoxy, exit.
> [tslg at Hbsk2 ~]$
> I'm a little surprised that Fedora added /usr in there; she can
> do /sbin/ifconfig perfectly well ...
> Learning vi is one of the things that's been daunting me, lo!,
> these dozen years or more ....
Having the user in the sudoers file is not always enough. The ideal
way of adding an user to the sudoers file also specifies the "program
groups"/ commands the specified user can run. So maybe in your case
the user is setup in this way, and privoxy is not on that list of
commands. However you can always specify something like this to allow
user ALL=(ALL) ALL
For the time being to get the job done you might try simply using su.
Open source is the future. It sets us free.
More information about the users