summaryrefslogtreecommitdiff
path: root/cloudinit/distros
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2019-12-17 14:43:03 -0500
committerChad Smith <chad.smith@canonical.com>2019-12-17 12:43:03 -0700
commit9faf77984175decb6ed08ba8ca2b65ea07c5867b (patch)
tree5d61e6fd70270e31e9d01a91fb973fcdb00f7676 /cloudinit/distros
parent22054368db4cb83074860f8114e61a8fb183489d (diff)
downloadvyos-cloud-init-9faf77984175decb6ed08ba8ca2b65ea07c5867b.tar.gz
vyos-cloud-init-9faf77984175decb6ed08ba8ca2b65ea07c5867b.zip
Partially revert "fix unlocking method on FreeBSD" (#116)
Specifically, revert the changes to logic which are incorrect. The testing introduced is for a separate part of the codebase, so is retained. This (partially) reverts commit e2840f1771158748780a768f6bfbb117cd7610c6.
Diffstat (limited to 'cloudinit/distros')
-rw-r--r--cloudinit/distros/freebsd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/distros/freebsd.py b/cloudinit/distros/freebsd.py
index caad1afb..8e5ae96c 100644
--- a/cloudinit/distros/freebsd.py
+++ b/cloudinit/distros/freebsd.py
@@ -256,7 +256,7 @@ class Distro(distros.Distro):
def lock_passwd(self, name):
try:
- util.subp(['pw', 'lock', name])
+ util.subp(['pw', 'usermod', name, '-h', '-'])
except Exception as e:
util.logexc(LOG, "Failed to lock user %s", name)
raise e