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.
Having trouble with adding users.
The user I added during installation isn't there.
Trying to "adduser" but I'm unable to add any users to the "sudoers" group. At least, that's the group name the error message has.
So how do I get to use "sudo" as an ordinary user?
If I use kuser the group list does not include "sudo"
adduser did not give me an option for that
So how the frack can I use a box if I can't "sudo" ?
What have I missed here?
Last edited by Captain Brillo; 06-08-2019 at 11:17 PM.
which is a vi editing interface to the sudo configuration file. Near the bottom is a commented out line saying "# %sudo ALL=(ALL) ALL". Uncomment that line, save & exit. That will give all users sudo acccess - probably good enough if you're the only user on the machine. You can also limit sudo access to particular users or groups - see other examples in the configuration file. See also:
Code:
man sudoers
If vi isn't an editor you're familiar with, you can edit the configuration file /etc/sudoers directly with your favourite editor.
Remember, both, that it is misuse of sudo to configure it as all-or-nothing. Such misuse is unsafe. Accounts should be granted just enough privilege to accomplish the tasks they need to, no more, no less.
Yes, "man sudoers" is the ultimate reference, but manual pages are not tutorials and the one for sudoers is particularly long. So for the time being I would recommend the online presentation by Michael W Lucas, "sudo: You're Doing It Wrong". He'll have a new edition of "sudo Mastery" out soon, but for the immediate question, the presentation will have to do. There is both video and slides, but it is quite long.
It appears that this install has no "sudoers" group.
The man pages are confusing as heck.
How do I fix this?
What I do is uncomment the '# %wheel ALL=(ALL) ALL" line and make myself a member of the wheel group. You'll need to logout/login for that to take effect.
You could also make an entry similar to the one for root but substituting your own name e.g. 'fred ALL=(ALL) ALL'. You could further refine that entry by restricting the sudo privilege to a number of particular commands that you may want to use (which is why Turbocapitalist is asking which commands you'll want to run with sudo).
I just want to be able to use sudo when I need to, and not have to logout/in as root.
Having a bugger of a time getting this Slackware working - little issue after little issue - starting to feel like I'm wasting my time.
Seems to me that you are tackling Slackware as it it were Ubuntu. DON'T.
Slackware does things differently, i.e. it has not changed handling things since its inception. All the other distro's have surfaced after Slackware was already established, they may do things differently from Slackware but that does not mean Slackware does them the wrong way.
Think again why you started with Slackware, and ask yourself if you made the right choice. If the answer is "YES" then treat Slackware for the OS that it is.
If vi isn't an editor you're familiar with, you can edit the configuration file /etc/sudoers directly with your favourite editor.
That's a very dangerous thing to do! Visudo does a syntax check after filing the temporary saved file and before copying it over to overwrite the original. That means that if you made a syntax error, it will be reported and you can go back, double-check the change you made and correct it.
If you edit sudoers directly you don't get that check. And if sudoers is saved with a syntax error in it, sudo won't work any more.
The right way to do this is to set the EDITOR environmental variable to be your favourite editor and then use visudo.
If it's just a matter of shutting down or rebooting, most sudoers files include an alias for these commands, and you can give yourself sudo access to this (without a password if you like).
Can somebody explain why "visudo" seems to be read-only?
Are you executing visudo as root ? If so, what makes you think it is read-only, visudo will create a temp file, you change that then /etc/sudoers will be updated when you save and exit
EDIT - looks like Captain figured it out while I was typing this
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.