From: Michael Tremer Date: Tue, 4 Oct 2016 21:40:03 +0000 (+0100) Subject: setup: Store passwords in SHA format X-Git-Tag: v2.19-core106~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eef9b2529c3cab522dac4f4bcfa1a0075376514e;p=people%2Fstevee%2Fipfire-2.x.git 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 --- diff --git a/config/rootfiles/core/106/filelists/files b/config/rootfiles/core/106/filelists/files index 3468c58eec..77f73c88c3 100644 --- a/config/rootfiles/core/106/filelists/files +++ b/config/rootfiles/core/106/filelists/files @@ -19,3 +19,4 @@ srv/web/ipfire/cgi-bin/index.cgi srv/web/ipfire/cgi-bin/logs.cgi/log.dat srv/web/ipfire/cgi-bin/pppsetup.cgi srv/web/ipfire/cgi-bin/services.cgi +usr/sbin/setup diff --git a/src/setup/passwords.c b/src/setup/passwords.c index e7b4b5231a..50ee38ed73 100644 --- a/src/setup/passwords.c +++ b/src/setup/passwords.c @@ -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);