Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
How can I configure sudo to only allow "jdoe" to do anything he wants, but only as "jdoe" and not as "root".
I want to give root access to a select few. I don't mind them having root privs, but I want it logged so whatever is logged should show up under their name and not root. How can I do this?
I did try to just give access to /bin/sh , but once i do a "sudo sh" it will give a root shell. I want to be able to stop all ways of having a root shell so all activity is logged.
Effectively "sudo" runs the programs with root privileges, that's the point of using it. Restrict the usage of sudo to only those few exact commands you need and nothing else; the configuration is done in the /etc/sudoers file. I don't think it's possible, with sudo, to run programs that need root privileges as a regular user, because effectively the regular user seems to be root during the time the program is executed (meaning that the user gets granted root privileges for that action). That's very unclearly said, but I hope you understand.
You could probably wrap the command(s) into a script that the regular user can run, and the script runs the commands and possibly logs something. That's one way you can do it, but maybe others can give better ideas..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.