-
Notifications
You must be signed in to change notification settings - Fork 2
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: properly allow wheel group to use sudo via visudo #6
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Luís Ferreira <[email protected]>
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.
Please keep sudores.d
support and just install a new file there with your config.
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.
Sorry.
The This is what the default configuration looks like:
So instead of modifying the |
Yes, but that can change anytime.
Could you elaborate?
Yes, that avoids all this regex complexity. Also, the current regex is easily breakable, if we go with the regex approach we should use something a bit better. |
Sure, then I propose to have our own
The problem I faced is because - name: enable sudoers.d support
lineinfile:
path: /etc/sudoers
line: '#includedir /etc/sudoers.d' With the new configuration, it will write something like:
And will include the files inside
Yeah agree. |
Signed-off-by: Luís Ferreira [email protected]
The same approach on Arch Linux infrastructure https://git.archlinux.org/infrastructure.git/tree/roles/sudo/tasks/main.yml as sudoers file already has entries for what is done here previously. Also it's better to use visudo to edit
/etc/sudoers
.This approach will unsure that running ansible twice won't break
/etc/sudoers
file.