From 6c0854f16f3677ee8054c1b0dd0d4b8f66ca55c9 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sat, 6 Dec 2014 18:48:09 +0100 Subject: [PATCH] Fix bad setting of admin account --- distros/debian8/zoneminder.postinst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/distros/debian8/zoneminder.postinst b/distros/debian8/zoneminder.postinst index bd8ee93c7..307347f7a 100644 --- a/distros/debian8/zoneminder.postinst +++ b/distros/debian8/zoneminder.postinst @@ -36,8 +36,7 @@ mysql_install_admin() { dbc_mysql_exec_command "DELETE FROM Users WHERE Username = 'admin';" || true # Install the new admin account defined with debconf - md5_password="`echo -n $ADMIN_PASSWORD | md5sum | sed -e 's/ *-$//'`" - dbc_mysql_exec_command "INSERT INTO Users (id, username, password) VALUES (1, '$ADMIN_LOGIN', '$md5_password');" || true + dbc_mysql_exec_command "INSERT INTO Users VALUES (1,'$ADMIN_LOGIN',password('$ADMIN_PASSWORD'),'',1,'View','Edit','Edit','Edit','Edit','Edit','','');" || true } # Exit if user didn't want to use debconf