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.
This commit is contained in:
Michael Marineau 2014-03-31 22:20:02 -07:00
parent 23d02363ee
commit 5ef3e1f32b

View File

@ -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 != "" {