-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sudo configures only wheel, not all login groups #3407
Comments
Maybe the confusion is between "shell access" and "shell assigned"? This indeed changed when we started adding shell selection which previously was only for administrators, hence the wheel group attachment. Other components allow specifying an arbitrary group as well. Should we do the same for sudo? Cheers, |
|
(I'm not comfortable with giving all shell-enabled users sudo capabilities.) |
|
Hi Franco, lightning fast as always. ;) Cheers, |
|
Ah ok you mean latching on to "Login Group" in secure shell access? That would work requiring a small text change as well for the sudo help label: Permit sudo usage for administrators with secure shell access. Do you agree? :) |
|
Yes, option 2 would take the entries to template from the SSH Login Group, and indeed the help text woud read
Option 3 is to have an new dropdown with selectable groups. The selected groups would be allowed sudo. Accompanying this dropdown would be the tickmark for NOPASSWD.
Sorry, but I was not thinking into the direction of considering sudo for groups without shell access. |
|
Ok, good. The tiny side effect is that sudo works for console login users as well which can have a shell but not necessarily run through SSH. A little rough around the edges the whole shell and sudo interplay, but I think option 2 would fit neatly. |
|
@kevemueller due to concerns of security I'm going for loosely coupled. You will find a second option for sudo where you can add an additional group to the sudoers much like SSH Login Group. It is to prevent footshooting in behavioural changes when this is deployed because if we latch on to another setting we might make the whole system less secure by updating. |
[x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[x] I have searched the existing issues and I'm convinced that mine is new.
Describe the bug
System/Settings/Administration/Secure Shell/Login Groupallows specifying the groups that are allowed to log-on to the shell.System/Settings/Administration/Authentication/Sudoallows specifying sudo usage for administrators with shell access.The Sudo setting only templates %wheel into the sudoers file, not all groups that are allowed to log-in.
To Reproduce
Steps to reproduce the behavior:
System/Access/GroupsSystem/Access/Usersbelonging to this groupSystem/Settings/Administration/Secure Shell/Login GroupSystem/Settings/Administration/Authentication/SudosudoThe sudo fails, as
/usr/local/etc/sudoersonly contains wheel.Expected behavior
Based on the description
One would expect that all groups allowed shell access would be enabled by this switch.
As this is a security related aspect, any expectation should match reality.
Possible ways to fix:
I propose second or third option. If somebody has a use case of allowing additional logon groups, that probably extends to sudo usage as well.
Environment
OPNsense 19.1.5_1 (amd64/OpenSSL)
The text was updated successfully, but these errors were encountered: