From 67162bca0c49d415f92aefa22972fd3ffe179da6 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 17 Jul 2013 15:35:01 -0400 Subject: plain text password of '' or None should not trigger setting --- cloudinit/distros/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cloudinit') 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. -- cgit v1.2.3