On 7 December 2011 20:51, Jonathan Nieder <[email protected]> wrote:
> Check if the user is in the "sudo" group.  Not 100% reliable, but
> it might do.

Neither is /etc/sudoers readable or easily parsed.  Otherwise such a check
could be used to change the default method from `su' to `sudo'.

> Even better would be to use pkexec from the policykit-1 package.

pkexec appears to only work under X.  When run from a console:

io:~$ pkexec aptitude
Error executing command as another user: No authentication agent was found.



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

Reply via email to