Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sudo -U <user> -l as root does not display some entries correctly #183

Closed
aayla-secura opened this issue Oct 6, 2022 · 1 comment
Closed

Comments

@aayla-secura
Copy link

An entry like the following:

test ALL = () /bin/ls

would allow user test to run both ls as themselves (the invoking user). When sudo -l is invoked by user test this is shown correctly. But when root runs sudo -U test -l, the output implies user test can run ls as root:

# sudo -U test -l
User test may run the following commands on ip-172-31-28-2:
    (root) /bin/ls
millert added a commit that referenced this issue Oct 6, 2022
We need to use list_pw if it is set instead of user_name.
GitHub issue #183
@millert
Copy link
Collaborator

millert commented Oct 7, 2022

This is fixed by 6a0f7cc

# sudo -U test -l

User test may run the following commands on xerxes:
    (test) /bin/ls

@millert millert closed this as completed Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants