Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
Try using visudo to edit sudoers and remove that line.
I bet sudo would then block root. So, `sudo ls -l` by root would fail; whereas, obviously, `ls -l` directly by root would work just fine. You can repair the "damage" by doing `vi /etc/sudoers`. vi just won't syntax check for you when you are done, and you could break things if you mess up.
On my Mac OS X system, that same line appears with %admin. So, an admin user can do anything with sudo.
Full disclosure: I haven't tried it, and don't want to mess with my servers. But it seems perfectly logical.
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
Having root `sudo ls -l` was just an example.
I think that as a matter of principle, sudoer is set up to not deny access to root. But, as a matter of flexibility, it is done in the configuration of the sudoers file. I would guess that makes the coding more straightforward as well, since there wouldn't be any exceptions for root that have to be coded in throughout the code.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.