ssmuser gid and uid
There should be a configuration option to set uid/gid of ssmuser, as well as simply not create it.
There is potential for conflict with systems that use ldap/AD auth (or simply have users/groups created later via configuration management tools) and join at a later stage of build.
This just broke my baking process. Easy enough to work around, but bothersome.
Thank you for the feedback! We will look into this.
Still not quite worked around. "easy" was.. hahaha.
here's an ansible snippet that changes uid/gid if the ssm-user exists, it "works" for my use case running on a schedule in session-manager as part of a larger playbook `
- name: "set ssm agent ssm-user uid and gid"
block:
-
name: check user ssm-user exists getent: database: passwd key: ssm-user ignore_errors: true register: ssmuserentry
-
name: change uid user: name: ssm-user uid:
when: ssmuserentry is succeeded -
name: group group: name: ssm-user gid:
when: ssmuserentry is succeeded `
-
Just a little bit more on this, to resolve this you need to pre-create the user and group entries on the host prior to installing the SSM Agent package.
On my test environment, I found that the /etc/sudoers.d/ssm-agent-users file wasn't being populated with the required entries, so you may need to populate that yourself and test accordingly.
ssm-user ALL=(ALL) NOPASSWD:ALL
Thank you for the feedback! Session Manager recently released a feature to support operating system user account, please refer to the public documentation for more details. https://aws.amazon.com/about-aws/whats-new/2019/07/session-manager-launches-run-as-to-start-interactive-sessions-with-your-own-operating-system-user-account/