setup: Store passwords in SHA format

htpasswd doesn't protect passwords very well. MD5 was used
before and now any newly created passwords will use the
SHA format.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2016-10-04 22:40:03 +01:00
parent 574ee681d2
commit eef9b2529c
2 changed files with 2 additions and 1 deletions

View File

@@ -56,7 +56,7 @@ int handleadminpassword(void)
return 0;
snprintf(commandstring, STRING_SIZE,
"/usr/sbin/htpasswd -c -m -b " CONFIG_ROOT "/auth/users admin '%s'", password);
"/usr/sbin/htpasswd -c -s -b " CONFIG_ROOT "/auth/users admin '%s'", password);
sprintf(message, _("Setting %s 'admin' user password..."), NAME);
if (runhiddencommandwithstatus(commandstring, _("Setting password"), message, NULL)) {
sprintf(message, _("Problem setting %s 'admin' user password."), NAME);