sudoers oooopsies
Hi peeps,
I was getting annoyed at the authentication request on installing new software - looked at sudoers and had NOPASSWD : ALL on admin and sudo so I stupidly removed the % at the start of each line. I have tried entering via recovery mode as root to fix this problem but when editing via sudo visudo it states file system is read only and if I attempt to su root with my password I just get authentication failure. bit stuck on what to try next and would dearly love to avoid booting from disc (mainly because I can't find my usb and don't want to wipe my install completely). Any help would be very much appreciated. |
If you can login as root, you can fix the problem by directly modifying the /etc/sudoers file. To get root login, you can always reboot to single-user or recovery mode.
visudo is not necessary in single-user mode. It is a wrapper around a normal editor (defined in EDITOR environment variable, defaults to some editor, usually vi), which makes sure the file is edited atomically; that all other processes see either the old contents, or the new contents, but never anything that combines the two. It is used to avoid race conditions and editing mishaps, but is in no way required. Therefore, if you can login as root, you can then edit the sudoers file using your favourite editor, for example using nano (nano /etc/sudoers) or vi (vi /etc/sudoers). |
I have booted via recovery mode, option menu presents 'root - drop to root shell prompt'.
However using nano /etc/sudoers when I attempt to save edits it says file system is read-only! is there a difference between single-user and recovery mode? if so how do you enter single-user mode as I have not attempted that... |
Quote:
Fortunately, you only need to run one command to switch from read-only file system to a normal one: Code:
mount -o remount,rw / |
THANK YOU!
I'd have your babies if I had the lady equipment... |
All times are GMT -5. The time now is 03:34 AM. |