-
Notifications
You must be signed in to change notification settings - Fork 57
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
Support user-defined entries for sudo NOPASSWD #507
Conversation
f2c9278
to
bfe28e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat. I assume WheelSudoNopasswd
removal won't break existing blueprints?
It's not exposed in composer yet. This change came from a discussion in chat that I started because I want to add it to composer and wanted to find a better name for it before it's finalised :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this a lot, thank you! This is fine as is, I would love a test and have more ideas/suggestions inline but really more about me thinking out loud than that anything needs to be changed :)
bfe28e6
to
bb145c6
Compare
Replace the wheel-sudo-nopasswd (bool) installer customization with sudo-nopasswd ([]string). Users can now specify a list of users or groups (groups must be prefixed with %). For each element in the array, the kickstart file will create a file that enables sudo with NOPASSWD for that entry. Each entry is added as a separate file in the sudoers.d drop-in directory. Duplicate entries are silently ignored.
The new configs are functionally equivalent to the old options, but since the drop-in filenames changed from /etc/sudoers.d/wheel to /etc/sudoers.d/%wheel, the hardcoded kickstart contents will change.
Add %sudo as well to the unattended-iso test as a test that multiple groups work.
When testing if the relevant stages were created in the Anaconda installer ISO tree pipeline, also check that the content ID for the embedded (raw) kickstart file is the expected one based on the groups added to the NoPasswd option.
bb145c6
to
37a9311
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Replace the wheel-sudo-nopasswd (bool) installer customization with sudo-nopasswd ([]string). Users can now specify a list of users or groups (groups must be prefixed with %). For each element in the array, the kickstart file will create a file that enables sudo with NOPASSWD for that entry. Each entry is added as a separate file in the sudoers.d drop-in directory.