Skip to content
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

Allow password-less sudo for basebox user #103

Open
ideaship opened this issue Mar 28, 2024 · 3 comments
Open

Allow password-less sudo for basebox user #103

ideaship opened this issue Mar 28, 2024 · 3 comments

Comments

@ideaship
Copy link
Contributor

Currently, we write the line basebox ALL=(ALL) ALL into /etc/sudoers.d/basebox [1].

This is not sufficient if we want to use the basebox user with password-less sudo. Even if added the user to the sudo group and gave members of the sudo group password-less sudo, the file specifically for the basebox user would take precedence. Do we want to change the current default in BISDN Linux?

Also, having basebox and basebox.default lying around in /etc/sudoers.d/ (presumably upgrade artifacts) is confusing; we should consider cleaning that up.

[1] https://github.com/bisdn/meta-switch/blob/main/recipes-core/basebox-user/basebox-user.bb

@KanjiMonster
Copy link
Contributor

Also, having basebox and basebox.default lying around in /etc/sudoers.d/ (presumably upgrade artifacts) is confusing; we should consider cleaning that up.

This happens (or should only happen) if you modified /etc/sudoers.d/basebox - the .default is the original file from the image, renamed to .default if the backed up version differs from it (if they are identical, it shouldn't be created).

It is kept so you can easily revert back to defaults, or know what values you changed.

@ideaship
Copy link
Contributor Author

That is true for all the configuration files that we back up and restore. The file in /etc/sudoers.d, however, is a special case because AFAICT the *.default file is active, too. While other files are not processed with a different name (e.g., /etc/passwd.default), /etc/sudoers.d/basebox.default is.

@KanjiMonster
Copy link
Contributor

That is true for all the configuration files that we back up and restore. The file in /etc/sudoers.d, however, is a special case because AFAICT the *.default file is active, too. While other files are not processed with a different name (e.g., /etc/passwd.default), /etc/sudoers.d/basebox.default is.

At least according to https://github.com/bisdn/meta-switch/blob/main/scripts/installer/lib/backup.sh#L167 the .default shouldn't be active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants