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:
parent
23d02363ee
commit
5ef3e1f32b
@ -34,6 +34,8 @@ func CreateUser(u *User) error {
|
|||||||
|
|
||||||
if u.PasswordHash != "" {
|
if u.PasswordHash != "" {
|
||||||
args = append(args, "--password", u.PasswordHash)
|
args = append(args, "--password", u.PasswordHash)
|
||||||
|
} else {
|
||||||
|
args = append(args, "--password", "*")
|
||||||
}
|
}
|
||||||
|
|
||||||
if u.GECOS != "" {
|
if u.GECOS != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user