[commits] [Wiki] changed: SQLAuthHowTo
Michael Rubinsky
mrubinsk at horde.org
Sat May 12 02:27:36 UTC 2012
mrubinsk Sat, 12 May 2012 02:27:36 +0000
Modified page: http://wiki.horde.org/SQLAuthHowTo
New Revision: 27
Change log: Fix example non-domain queries; \P is always the
*encrypted* password.
@@ -39,16 +39,16 @@
* Choose the appropriate encryption algorithm for your
authentication data. This obviously should match the algorithm that
was used to create any existing credentials.
If you are not using domains, then use the following queries:
-* For query_auth, enter: {{SELECT * FROM users WHERE userid = \L AND
password = MD5(\P);}}
-* For query_add, enter: {{INSERT INTO users (userid,password,home)
VALUES (\L, MD5(\P), concat('/home/',\L));}} //NB: You may need to
change the "home" value to point to their home directory or file space//
-* For query_getpw, enter: {{SELECT password FROM users WHERE userid = \L;}}
-* For query_update, enter: {{UPDATE users SET userid = \L WHERE
userid = \O) LIMIT 1;}}
-* For query_resetpassword, enter: {{UPDATE users SET password =
MD5(\P) WHERE userid = \L;}}
-* For query_remove, enter: {{DELETE FROM users WHERE userid = \L;}}
-* For query_list, enter: {{SELECT * FROM users;}}
-* For query_exists, enter: {{SELECT 1 FROM users WHERE userid = \L;}}
+* For query_auth, enter: {{SELECT * FROM users WHERE userid = \L AND
password = \P}}
+* For query_add, enter: {{INSERT INTO users (userid, password, home)
VALUES (\L, \P), concat('/home/', \L))}} //NB: You may need to change
the "home" value to point to their home directory or file space; This
value is not needed/used by Horde.//
+* For query_getpw, enter: {{SELECT password FROM users WHERE userid = \L}}
+* For query_update, enter: {{UPDATE users SET userid = \L WHERE userid = \O}}
+* For query_resetpassword, enter: {{UPDATE users SET password = \P
WHERE userid = \L}}
+* For query_remove, enter: {{DELETE FROM users WHERE userid = \L}}
+* For query_list, enter: {{SELECT * FROM users}}
+* For query_exists, enter: {{SELECT 1 FROM users WHERE userid = \L}}
If you are using domains, then use the following queries:
* For query_auth, enter: {{SELECT * FROM users WHERE userid =
SUBSTRING_INDEX(\L, '@', 1) AND domain = SUBSTRING_INDEX(\L, '@', -1)
AND password = MD5(\P);}}
More information about the commits
mailing list