Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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!
Ah, that just means your recovery mode mounts the root filesystem read-only. It is a good thing; it means no changes are done (can be done!) to the filesystem, unless you explicitly allow it. (If one of your disks crashes, it is better that the system does not attempt to do any fixes, or do any changes at all to the disk contents, before you have had the opportunity to safely copy (or try to copy) your files to some other storage media.)
Fortunately, you only need to run one command to switch from read-only file system to a normal one:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.