diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | cloudinit/distros/__init__.py | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -83,6 +83,7 @@ Support. [Sankar Tanguturi] - timezone: use a symlink rather than copy for /etc/localtime unless it is already a file (LP: #1543025). + - Enable password changing via a hashed string [Alex Sirbu] 0.7.6: - open 0.7.6 diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 4bad8708..a73acae5 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -393,6 +393,10 @@ class Distro(object): if 'plain_text_passwd' in kwargs and kwargs['plain_text_passwd']: self.set_passwd(name, kwargs['plain_text_passwd']) + # Set password if hashed password is provided and non-empty + if 'hashed_passwd' in kwargs and kwargs['hashed_passwd']: + self.set_passwd(name, kwargs['hashed_passwd'], hashed=True) + # Default locking down the account. 'lock_passwd' defaults to True. # lock account unless lock_password is False. if kwargs.get('lock_passwd', True): |