SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
Sudoers Typical Example
I've never used sudo (I've always used su -) and now have to set it so users can use MySQL Workbench (it seems pretty Ubuntu-heavy).
Anyway, reading the manual page has left me... well, confused-ish.
Is there a simple example of what goes in that file that's functionally equivalent to su -? Don't wanna be an expert, just want to use for this one purpose.
Is there a simple example of what goes in that file that's functionally equivalent to su -? Don't wanna be an expert, just want to use for this one purpose.
I think (I could be wrong though) to achieve your purpose 'su' can be enough: sudo is not necessary. Just create one $USER that has this and that powers to attain your end, then let other users su into that ID to perform the needed task. Sudo is too much.
Assumed that you have /etc/sudoers file because it is ubuntu. Edit this to fix some sudo user.
So to allow a root shell you could provide "/bin/sh" or "/bin/su -" as commands.
To allow specific commands that do not allow a root shell you need to be very selective about what you allow (for instance most commands that write files once you've enabled them to write files as root have potential for changing security-related configuration).
Yes, it left me feeling that way too. I can't help but think the guy who wrote that man-page was more interested in showing us how clever he was rather than communicating how to actually use the damn thing.
Anyway, it's a little more complicated than this, but the basics can be summarised as: who where=(as) options what
who can run what command(s) as which user(s), on where
'who', 'where' and 'as' and even 'what' can be specified as 'ALL' meaning any user, any host, any command etc.
e.g.
gazl ALL=(build) NOPASSWD: /home/build/kernel.SlackBuild
User gazl can run /home/build/kernel.SlackBuild as user 'build' on any host(*) without specifying a password.
Rather than read the man-page, you're better off just looking at the examples in the suders file itself, then come back and re-read the man page once you've got the basics down.
(*) sudo is not network aware, it simply allows you to share one sudoers rule file across your network and have certain rules apply to certain hosts.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Original Poster
Rep:
OK, so I added
Code:
trona ALL=(ALL) ALL
with visudoers. That appears to let "me" do stuff.
That solved one problem with getting MySQL Workbench going (it doesn't say that I'm not in "sudoers" any more anyway) but I can't start the "database server instance" for some reason or other; that's going to take some digging in the MySQL Workbench documentation, methinks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.