SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I see in the web that there are several ways to set up /etc/sudoers to allow myself to execute commands as if I were root.
1) add myself to wheel group and setup wheel to ALL by removing the # from that linel
2) add myself as xxxx ALL=(ALL) ALL beneath root ALL=(ALL) ALL.
Can I do it this way so as not to have to respond with password:
xxxx ALL=(ALL) nopasswd:ALL
3) add myself for specific commands in /etc/sudoers
4) or make myself a member of sudo group.
Obviously, #3 is the safest but for myself wouldn't #2 be acceptable. Since this is a single user system I am presuming the nopasswd mode should be OK.
Becoming a member of sudo or wheel group does NOT seem to be the most secure.
What if I were to have a copy of sudoers which had no users and copied that to /etc/sudoers when on the internet and another to copy to sudoers when off the web. If these 2 files were made very secure would this be considered a secure means?
Do I have the approaches correct as I seen several to employ and after an extremely long time in computer science this is the second time I have had to fiddled with sudo.
While the second option is a viable option for a single user system, the NOPASSWD option is not. This is basically the same as logging in as root which is a bad idea if your system is exposed to the net.
I personally use su for administering the system, with a few selected commands that I use very often, setup with sudo without password.
I normally do your 2nd method but I leave nopasswd option off. If you are working in command prompt and once you issue the command "sudo <yourcommands>" you won't have to keep reentering your password over and over. Its a little safer and I would go with that route.