diff options
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | cloudinit/distros/__init__.py | 7 | 
2 files changed, 5 insertions, 4 deletions
| @@ -14,6 +14,8 @@   - fix CloudStack DataSource to use Virtual Router as found in     /var/lib/dhcpclient rather than default gateway (LP: #1089989)   - fix redaction of password field in log (LP: #1096417) + - fix to cloud-config user setup.  Previously, lock_passwd was broken and +   all accounts would be locked unless 'system' was given (LP: #1096423).  0.7.1:   - sysvinit: fix missing dependency in cloud-init job for RHEL 5.6    - config-drive: map hostname to local-hostname (LP: #1061964) diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 8a3e0570..38b2f829 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -338,10 +338,9 @@ class Distro(object):          if 'plain_text_passwd' in kwargs and kwargs['plain_text_passwd']:              self.set_passwd(name, kwargs['plain_text_passwd']) -        # Default locking down the account. -        if ('lock_passwd' not in kwargs and -            ('lock_passwd' in kwargs and kwargs['lock_passwd']) or -            'system' not in kwargs): +        # Default locking down the account.  'lock_passwd' defaults to True. +        # lock account unless lock_password is False. +        if kwargs.get('lock_passwd', True):              try:                  util.subp(['passwd', '--lock', name])              except Exception as e: | 
