The main concern we have to be wary of with postinst of cloud-init
automatically updating passwords is that we cannot be 100% certain that
an admin hasn't come along intentionally to clear a password for a given
case. Given the following scenario below, cloud-init shouldn't reset the
default user password based on original user-data, because a sysadmin
has intentionally removed the password for some other need. cloud-init
magically resetting the password across unattended-upgrades could be
highly undesirable and break potential automation in this case.

Counter-example: A system admin post-reboot needs empty password for
given system on protected network

1. cloud-config user-data originally provisioning default user with a known 
password 3 months prior
2. system admin 2 months later updates the default user to an empty password 
for a use-case for tooling or system maintenanceautomation
3. cloud-init unattended-upgrade sees empty password, resets password to 
original password value from user-data
4. External scripts/tooling/automation can no longer ssh as default user with 
empty password

In this example there is no-way for current admins to get back into the
machine if they don't also have access to the original user-data
provided to the machine during launch.

Given the above example, it appears highly unlikely we would want
automation magic to reset passwords across unattended-upgrades for
perceived empty passwords based on stale user-data. There is no clear
audit trail of admin password resets that provides cloud-init with the
visibility to do the right thing in all cases.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2153951

Title:
  unconfigured sssd leads to cloud-init removing a password from a user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2153951/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to