]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
setup: Store passwords in SHA format
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Oct 2016 21:40:03 +0000 (22:40 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Oct 2016 21:41:48 +0000 (22:41 +0100)
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>
config/rootfiles/core/106/filelists/files
src/setup/passwords.c

index 3468c58eecbe16ee744d13b00c0ef048b8b296dd..77f73c88c3b94f61b5f52ca48ea946449dbee434 100644 (file)
@@ -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
index e7b4b5231a0343f7c911808aa6f0d6079f191931..50ee38ed73c22d2d3fededbbeb9c1035550bcd3a 100644 (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);