[sudo-users] sudo sudoedit /etc/printers.conf

Todd C. Miller Todd.Miller at courtesan.com
Wed Jul 16 10:13:40 EDT 2008


In message <e8401e700807160639y20c4782dw2b93b873118ebd35 at mail.gmail.com>
	so spake "Valdemir Santos" (valdemirs):

> Is there any way to avoid issue "sudo sudoedit" to edit any file?
> 
>  sudo sudoedit /etc/printers.conf
> 
> 
> When I issue "sudoedit /etc/printers.conf" I get :
> 
> Sorry, user john is not allowed to execute 'sudoedit /etc/printers.conf' as
> root on solaris002.

If you run "sudo sudoedit /etc/printers.conf" you are effectively
running sudo twice.  It is the same as running "sudo sudo -e
/etc/printers.conf".

To allow a user to do "sudoedit /etc/printers.conf" you need to use
"sudoedit" in /etc/sudoers, not /path/to/sudoedit.  Ie: you don't
specify the path.  This is because sudoedit _is_ sudo so there is
no real command to be run.

 - todd



More information about the sudo-users mailing list