Bug 862

Summary: add scriptable interface to list user's with sudo permissions
Product: Sudo Reporter: vvavrychuk
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: NEW ---    
Severity: normal    
Priority: low    
Version: 1.8.26   
Hardware: PC   
OS: Linux   

Description vvavrychuk 2018-11-30 05:35:04 MST
Some software may want to get a list of users with sudo permissions.

For example, https://github.com/rvm/ubuntu_rvm wants to add all users with sudo permissions to rvm group.

It does it by checking sudo group in /etc/group, https://github.com/rvm/ubuntu_rvm/blob/master/debian/postinst#L39.

This method is not complete because user might be granted sudo permissions via sudoers, corresponding bug reported in https://github.com/rvm/ubuntu_rvm/issues/31.

It would be great if sudo provides scriptable analog of 'sudo --list' so its output can be used from other scripts.