summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-07-17 15:35:01 -0400
committerScott Moser <smoser@ubuntu.com>2013-07-17 15:35:01 -0400
commit67162bca0c49d415f92aefa22972fd3ffe179da6 (patch)
tree9601dca6d5b93a7efe630cbd6ea0392bff7e646f /cloudinit
parentfe1e3197482a25365379be306741d0a943dcdfd5 (diff)
downloadvyos-cloud-init-67162bca0c49d415f92aefa22972fd3ffe179da6.tar.gz
vyos-cloud-init-67162bca0c49d415f92aefa22972fd3ffe179da6.zip
plain text password of '' or None should not trigger setting
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/distros/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index cda2c6af..249e1b19 100644
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -359,8 +359,8 @@ class Distro(object):
# Add the user
self.add_user(name, **kwargs)
- # Set password if plain-text password provided
- if 'plain_text_passwd' in kwargs:
+ # Set password if plain-text password provided and non-empty
+ if 'plain_text_passwd' in kwargs and kwargs['plain_text_passwd']:
self.set_passwd(name, kwargs['plain_text_passwd'])
# Default locking down the account. 'lock_passwd' defaults to True.