nuageinit: Accept plain text passwords
Per pw(8), when -H is set, the password should be supplied already encrypted in a form suitable for writing directly to the password database (passwd in cloud-init tems); -h provides a special interface by which interactive scripts can set an account password using pw(8) in plain text (plain_text_passwd in cloud-init terms). The default user (freebsd) is defined with a plain_text_passwd (freebsd), not with an encrypted one.
This commit is contained in:
committed by
Baptiste Daroussin
parent
9840598aa3
commit
7b73ecfe64
@@ -112,7 +112,7 @@ local function adduser(pwd)
|
||||
postcmd = " -H 0 "
|
||||
elseif pwd.plain_text_passwd then
|
||||
precmd = "echo "..pwd.plain_text_passwd .. "| "
|
||||
postcmd = " -H 0 "
|
||||
postcmd = " -h 0 "
|
||||
end
|
||||
cmd = precmd .. "pw "
|
||||
if root then
|
||||
|
||||
Reference in New Issue
Block a user