Open oz123 opened 2 years ago
Here is a workaround:
import crypt
server.user(
"foo", present=True,
unique=True,
)
crypt_pw = crypt.crypt(PW_FROM_ENV_VAR, crypt.METHOD_SHA512)
server.shell(
name=f"Add password to foo user",
commands=[f"""echo 'foo:{crypt_pw}' | chpasswd -e"""],
)
I'm going to fix this... I have a working set of changes that pass the unit tests but holy smokes the e2e tests take a while to run.
Currently, pyinfra does now allow setting a user's password.
https://docs.pyinfra.com/en/1.x/operations/server.html#server-user
Sometimes it's required that users have a password. Adding in an ecrypted format would be great:
e.g: