]> git.pld-linux.org Git - packages/apache-mod_auth_mysql.git/commitdiff
a2ed9bc0060f2015361dffe8d8b724e9 mysql-group-auth.txt
authorkloczek <kloczek@pld-linux.org>
Mon, 22 Oct 2001 17:29:53 +0000 (17:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mysql-group-auth.txt -> 1.1

mysql-group-auth.txt [new file with mode: 0644]

diff --git a/mysql-group-auth.txt b/mysql-group-auth.txt
new file mode 100644 (file)
index 0000000..f8b97d1
--- /dev/null
@@ -0,0 +1,48 @@
+This document describes how to use group-based authorization using my
+version of mod_auth_mysql.c.  This version is based heavily on my own
+version of mod_auth_msql.c, which was widely distributed prior to the
+one currently shipped with Apache.
+
+There are two options to using groups.  You can put the "user_group"
+field into the same table as the user database if each user is in only
+one group, or you can have a separate table that contains the fields
+"user_name" and "user_group" if each user is a member of multiple
+groups.
+
+If the user_group field is part of the full user table, the table has
+three fields at least: user_name, user_group, user_passwd.  The
+user_group field must be "PRIMARY KEY" in the user database containing
+a password.  The htaccess file would be this:
+
+AuthName My Authorization
+AuthType Basic
+AuthGroupFile /dev/null
+AuthMySQLHost localhost
+AuthMySQLDB authdata
+AuthMySQLUserTable user_info
+AuthMySQLGroupField user_group
+require group admin
+
+If you have a separate database for groups, the two tables would be
+
+user_info: user_name, user_passwd (user_name must be PRIMARY KEY)
+user_group: user_name, user_group (user is not PRIMARY KEY, as we have
+       multiple tuples for user_name,user_group to let a user be in
+       multiple groups)
+
+and htaccess would have this:
+
+AuthName My Authorzation
+AuthType Basic
+AuthGroupFile /dev/null
+AuthMySQLHost localhost
+AuthMySQLDB authdata
+AuthMySQLUserTable user_info
+
+AuthMySQLGroupTable my_groups
+AuthMySQLGroupField user_group
+require group admin
+
+
+
+Assuming that the required group name is "admin".
This page took 0.067174 seconds and 4 git commands to generate.