Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
following problem:
When trying to set my MAC address permanently, I changed the owner of /etc (and all subfolders) to my own account (since otherwise I could not change /etc/network as it was writing protected), not knowing that this might cause troubles for sudo.
Now of course, if I want to use sudo, I get the error message
"no valid sudoers sources found, quitting". Could you please help me restore it?
Two things I've tried, that don't work:
- pkexec ... --> an authorization is required with a password, to run "/bin/bash", however, this password is NOT the one from my account, so I do not know it!
- something like chown root:root /etc/sudoers --> "Operation not permitted"
There are also suggestions to start Linux in recovery mode or s.th. like that - but I do not know how (holding shift at restart doesn't work).
Well, you have got yourself into a mess! You have at any rate learned an important lesson for the future: never change the ownership or permissions of system files. They are what they are for a reason. If you need to modify configuration files, use sudo to do your edits. That's what it's there for.
Endless is a very atypical Linux. It's designed as a playpen for users who don't know much about computers but just want simple functionality. It is deliberately crippled in many ways, so it's a bad distro to experiment with. In a standard Linux, there would be several ways of getting out of this bind, the simplest being to use su with the root password, but it seems that you weren't given a known root password (as in the *buntus).
If it were Windows, you'd be told "Just reinstall", and of course that would work here too. But a slightly less drastic solution would be to boot from a SystemRescue CD or USB drive (which automatically gives you root access), mount the root partition and chown /etc back to root:root.
You might also want to think of installing a second, more standard system like Debian alongside Endless and doing your experiments there. You learn by this kind of thing, but Endless is not a good system for learning. It wasn't designed for that.
Thanks for the reply, hazel.
Yes, me, as being new to the operating system, thought, "Well, this ACER has a Linux distribution, and Linux is what I want" and didn't know that there are so large differences.
Good! I'm glad you found an answer by yourself. You definitely have the right attitude for a Linux user. Many people here would say, "Play with it until it breaks, then learn how to mend it." But that's easier to do in some Linux distros than others. One of my beefs with the Ubuntu family and the reason I don't use them is that they don't give you a root password, so if you mess up sudo, you've had it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.