So i modified my sudoer file and now sudo hangs and I can't change it back

I was having fun messing around in terminal when suddenly, I messed up my sudoers file in /etc/. Now the sudo command hangs and I am not able to change it back. I would rather not reset my computer completely. Is there any way to restore the sudoers file back to defaults? (I'm on mac osx 10.12.6). Thanks

1

1 Answer

You can start your Mac in single user mode and from there, revert the changes you've made.

Edit: You may find here the original sudoers file, or at least a reference to understand what went wrong in your edition.

Remember to use visudo to check the syntax of your sudoers file.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like