Honestly, add a user to the sudoers should be just a matter of a checkbox. At least it is the case with sme server
I agree @stephdl
What would you like to achieve?
Could you describe and example and usage scenario?
Since is the first time I heard this request, Iâd start with an howto rather adding new code.
/cc @bwdjames
Hi @giacomo,
Essentially there are some administrative tasks that temporarily require root access and logging in as root is not recommended from a security point of view, hence granting sudo access to specific users.
An easy to find HowTo for this would definitely be a real good starting point for this and it would be interesting to hear from the community as well how many feel the need or want to grant a specific user or users sudo access.
Although having a checkbox option to select on the user account information page would be nice for ease of use, I am unsure if that is a good idea or not, depending on how it gets used and if it opens the possibility of it being abused due to lack of understanding of the functionality or potentially political abuse of a boss who doesnât have the required information demanding the privilege and then doing some damage (although I see this an a rare situation and rare occurance).
It would really depend on the business case for it and how many people think its something that would be of benefit. I know that I think it would be good to have, but then Iâm biased based on the work I do.
thinking how to do it it is now more complicated with the end of the db accounts for users, while it is a common delegating task. In many case you might need to delegate the power of root.
With sudo you can delegate some users to run specific commands (even with a list of valid parameters) with root privileges.
Correct if Iâm wrong: youâre trying to give root access to a specific user, not to delegate some tasks with sudo.
In this case, giving the power to become root is a matter of adding a user to the wheel
group.
This is the upstream doc: Chapter 6. Gaining Privileges | Red Hat Product Documentation
It is the correct procedure, but Iâm afraid both CLI commands (i.e. usermod, lusermod, samba-tool) and the UI cannot add to wheel (a group defined by /etc/group
) an user coming from LDAP or AD.
We could set (as opt-in) âdomain adminsâ (or any other group in LDAP or AD) as a âwheelâ equivalent, though. We have the admins
key in configuration
DBâŠ
yes the purpose is to gain/delegate root access. Imagine I ssh a server to fix/search a bug, I might need privileged accesses and rights but momently, not forever
Ideally I prefer the sudo rights for a âbabyâ administrator, you could hope that heâll forget the sudo before to do ârm -rf /var/lib/nethserverâ
ârm -rf /var/lib/nethserverâ is not as much fun as rm -rf /
Linux is an adult nowâŠyou cannot do it anymoreâŠyou need to give more arguments
Never understimate idiots
Or bad luck
Or argue with them - they will drag you down to their level and beat you with experienceâŠ
I agree, we could automatic five sudo access to admins.
Or, as an alternative, we can create an ad-hoc group.
@bwdjames you can solve your problem like this (not tested):
- create a group
powerusers
in Users & Groups page - add one ore more user to the group
- create a sudo file like this:
echo "%powerusers ALL=(ALL) ALL" > /etc/sudoers.d/90powerusers
chmod 440 /etc/sudoers.d/90powerusers
Will give it a try later this evening or tomorrow, schedule over booked last night and today
@giacomo I can confirm that this works and is a very good solution to have in the documents somewhere.
Should I add it to the developer manual or would you like to try to open a pull request on the readme file?
just my 2C question. Is it possible to get a sudo group, created by the rpm, and add users when it is needed in this group. An automatic task is interesting, a RTFM solution could be quite boring
This is not possible on NS 7 because you donât know where accounts are stored, locally on a LDAP or even on a remote Microsoft Active Directory.
So ârootâ account for management is not member of groups?