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.
This commit is contained in:
parent
e3427ea4b8
commit
35db83e077
@ -5,6 +5,8 @@
|
|||||||
'initctl reload-configuration' (LP: #1124384). If so, then invoke it.
|
'initctl reload-configuration' (LP: #1124384). If so, then invoke it.
|
||||||
- add Azure datasource.
|
- add Azure datasource.
|
||||||
- add support for SuSE / SLES [Juerg Haefliger]
|
- add support for SuSE / SLES [Juerg Haefliger]
|
||||||
|
- add a trailing carriage return to chpasswd input, which reportedly
|
||||||
|
caused a problem on rhel5 if missing.
|
||||||
0.7.2:
|
0.7.2:
|
||||||
- add a debian watch file
|
- add a debian watch file
|
||||||
- add 'sudo' entry to ubuntu's default user (LP: #1080717)
|
- add 'sudo' entry to ubuntu's default user (LP: #1080717)
|
||||||
|
@ -75,7 +75,7 @@ def handle(_name, cfg, cloud, log, args):
|
|||||||
plist_in.append("%s:%s" % (u, p))
|
plist_in.append("%s:%s" % (u, p))
|
||||||
users.append(u)
|
users.append(u)
|
||||||
|
|
||||||
ch_in = '\n'.join(plist_in)
|
ch_in = '\n'.join(plist_in) + '\n'
|
||||||
try:
|
try:
|
||||||
log.debug("Changing password for %s:", users)
|
log.debug("Changing password for %s:", users)
|
||||||
util.subp(['chpasswd'], ch_in)
|
util.subp(['chpasswd'], ch_in)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user