summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-07-23 11:45:34 -0400
committerScott Moser <smoser@ubuntu.com>2013-07-23 11:45:34 -0400
commit1072010fdde26203bc69b911e4a478953323a6ef (patch)
tree51ab51b060e9117c48955ffed1c0b1e7fa6e10fb /cloudinit
parent1edfb2a7a36a2bdddfe0ca48ba5d23721bf17a35 (diff)
downloadvyos-cloud-init-1072010fdde26203bc69b911e4a478953323a6ef.tar.gz
vyos-cloud-init-1072010fdde26203bc69b911e4a478953323a6ef.zip
Fix password setting for rhel5.
Changing password via 'chpasswd' command in rhel5 would fail, if input to the 'chpasswd' command doesn't end with '\n'. The fix is just to append a carriage return to the input.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_set_passwords.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py
index e93c8c6f..56a36906 100644
--- a/cloudinit/config/cc_set_passwords.py
+++ b/cloudinit/config/cc_set_passwords.py
@@ -75,7 +75,7 @@ def handle(_name, cfg, cloud, log, args):
plist_in.append("%s:%s" % (u, p))
users.append(u)
- ch_in = '\n'.join(plist_in)
+ ch_in = '\n'.join(plist_in) + '\n'
try:
log.debug("Changing password for %s:", users)
util.subp(['chpasswd'], ch_in)