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

visudo username is not in the sudoers file #39

Open
nguyenvulong opened this issue Sep 13, 2022 · 0 comments
Open

visudo username is not in the sudoers file #39

nguyenvulong opened this issue Sep 13, 2022 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@nguyenvulong
Copy link
Owner

nguyenvulong commented Sep 13, 2022

Username is not in the sudoers file. This incident will be reported

First, make sure that your username is in sudo group
If you did, the problem may have something to do with sudoers file (/etc/sudoers)

in my case, i accidently commented out 1 important line of the file, which is:

%sudo ALL=(ALL:ALL) ALL

Since you no longer have sudo permission anymore, you would need PolicyKit to fix the sudoers file.
This fix does not require rebooting the device or console (physical) access. You can do it from your ssh session.
Image Source: NixOS/nixpkgs#18012 (comment)

image

Now, you can run pkexec visudo to fix your sudoers file. For more detail, see this.

@nguyenvulong nguyenvulong added bug Something isn't working documentation Improvements or additions to documentation labels Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant