From 5ef3e1f32b55b97227c4a2d4a0d609df538f14b0 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Mon, 31 Mar 2014 22:20:02 -0700 Subject: [PATCH] fix(user): Use '*' as default password field rather than '!' When using openssh without pam it checks for a ! prefix in the password field, locking the account entirely if found. The other common lock character, *, is allowed by ssh to login via ssh keys so use it instead. --- system/user.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/user.go b/system/user.go index af9269d..79746cd 100644 --- a/system/user.go +++ b/system/user.go @@ -34,6 +34,8 @@ func CreateUser(u *User) error { if u.PasswordHash != "" { args = append(args, "--password", u.PasswordHash) + } else { + args = append(args, "--password", "*") } if u.GECOS != "" {