Page 1 of 1

Manage users via the config file

Posted: Mon Feb 12, 2018 6:45 pm
by zinefer
Has anyone managed their users by modifying the config file directly?

Mainly, how is the password encoded?

Re: Manage users via the config file

Posted: Tue Feb 13, 2018 2:54 am
by zinefer
It took me a while but I finally managed to create the same hash in bash.

echo -ne "passwordUSERNAME" | openssl sha | awk '{print $2}' | xxd -r -p | base64

Re: Manage users via the config file

Posted: Tue Feb 13, 2018 4:54 pm
by zinefer
I've been working on this a bit more and realized the password is hashed twice. I also slightly improved the command from my last post.

AuthNtLmSecureHash:
echo -ne "password" | iconv -f ascii -t utf16le | openssl md4 -binary | base64
AuthPassword:
echo -ne "passwordUSERNAME" | openssl sha -binary | base64

Re: Manage users via the config file

Posted: Tue Sep 03, 2019 8:40 am
by scegg
sha(sha0) is not supported under my openssl now.
Have to use another way to encrypt it.