On Thu, Jul 23, 2015 at 11:57:04PM +0000, Patrick Schleizer wrote:
> >> Even if not disallowed. Even without any custom sudoers settings, this
> >> patch would work? No disadvantages by it?
> >>
> >> kdesudo works on any system. "sudo apt-get install kdesudo", that's it.
> >> No special settings required. And if one would not have it installed,
> >> su-to-root would act as it does now. No difference then.
> > 
> > I just tested kdesudo and gksudo and they certainly do not work if the user 
> > is
> > not allowed to use sudo, but is allowed to use su.
> > 
> > Are you seeing something different ?
> 
> You're right!
> 
> Covering that case in the updated patch.

So your patch is doing
if sudo -n true >/dev/null 2>&1 ; then

The sudo documentation says:
     -n, --non-interactive
                 Avoid prompting the user for input of any kind.  If a password 
is required
                 for the command to run, sudo will display an error message and 
exit.

so it does not work because sudo ask for a password the first time: I get

%sudo -n true
sudo: sorry, a password is required to run sudo

Cheers,
-- 
Bill. <[email protected]>

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to