canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.91k stars 866 forks source link

Remove group entries from cloud.cfg.tmpl #4655

Open dermotbradley opened 10 months ago

dermotbradley commented 10 months ago

Bug report

Issue #4603 has highlighted that cloud-init is creating any distro-specific groups defined in /etc/cloud/cloud.cfg.tmpl on system where they are not already present on the system as non-system groups (i.e. gids > 999). However the groups defined in the template file all appear to be typical system groups rather than "normal" groups.

Therefore I think we should remove these group definitions to avoid them being incorrectly created (with wrong gids).

Steps to reproduce the problem

Run cloud-init on a distro where one of the distro-specific groups in cloud.cfg/cloud.cfg.tmpl is missing (see #4603 for an example)

Environment details

cloud-init logs

holmanb commented 10 months ago

Removing group definitions would change the group memberships of the default user, I don't think we can do that.

See my comment in the original bug for more details.