GitHub user weizhouapache added a comment to the discussion: Rocky Linux 9 and 
Ubuntu 24.04 template with cloud-init doesn't reset password on next subsequent 
boots

> @hanisirfan On Ubuntu 22 instead service with script above, I created service 
> with script in /etc/init.d/ and enabled it. In cloud.cfg `- [set_passwords, 
> always]`
> 
> ```
> ### BEGIN INIT INFO
> # Provides:          password
> # Required-Start:    $all
> # Required-Stop:
> # Default-Start:     2 3 4 5
> # Default-Stop:
> # Short-Description: your description here
> ### END INIT INFO
> cloud-init clean
> ```

@top-secrett 
that could be a good solution. will it run before `cloud-init` ?

It looks like the issue is, without `cloud-init clean`, cloud-init will not 
re-fetch userdata/metadata/password information from cloudstack VR, therefore 
new sshkey/password are not applied.

GitHub link: 
https://github.com/apache/cloudstack/discussions/9690#discussioncomment-10657099

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscr...@cloudstack.apache.org

Reply via email to