yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #91564
[Bug 1889545] Re: cc_users_groups docs should note that its settings only apply to user creation (so have no effect on existing users)
** Changed in: cloud-init
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1889545
Title:
cc_users_groups docs should note that its settings only apply to user
creation (so have no effect on existing users)
Status in cloud-init:
Fix Released
Bug description:
cloud-init does not create users that already exist in the system, for
obvious reasons. It is not obvious, however, that `users`
configuration in cloud-config will only be honoured on user creation
(see [0] for the code that skips existing users, as well as a comment
from a developer who was perhaps also surprised by this).
We should include a note in the docs to help people understand this.
[0] https://github.com/canonical/cloud-
init/blob/a13febd286d21f1754e32f4a05e722039eb452b8/cloudinit/distros/__init__.py#L399-L401
[Original Report]
In https://cloudinit.readthedocs.io/en/latest/topics/examples.html (line 20)
Does 'passwd' field in config file work?
I tried with below config
Content of cloud-config.ci
```
hostname: dev-host
users:
- name: root
lock-passwd: false
passwd: $1$root$1fvaXuILgb4rdRlHdQ80N/
```
And did - 'cloud-init --file ./cloud-config.ci init'
I generated hash of password using below command:
pass=(echo "password" | openssl passwd -1 -stdin -salt root)
And I don't see anything in logs regarding password.
If I use plain_text_passwd or hashed_passwd in my config file, I see
some log message about password.
Attaching log tarball.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1889545/+subscriptions
References