Sorry for not giving details. I am using mysql 3.23.58 and Apache 2.0.46 on Redhat enterprise server. I am using already existing database which were used with mod_auth_mysql 2.20 on Redhat 7.3 and apache 1.3.22. If user is in admin group, then login is ok. We have created 4 groups, those are weekly, monthly, admin, helpdesk. The user i am trying to login from is in group weekly and this is when i see "not in right group" in apache error log. The user is in group weekly.
Any help in this matter would be of great help.
Thanks
PAd
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the quick response. Below is the entry from /etc/httpd/conf.d/auth_mysql.conf. User 77211 is in the table group table dweekly.
I have one more question regarding parameter AuthMySQLUser AuthMySQLPassword, that it works only with "root" account (the one which is defined in "mysql" DB. Is there a way to use different account other than root. ( iam new to mysql)
<Limit GET POST>
order deny,allow
deny from all
Require group admins
Require group helpdesk
Require group weekly
</Limit>
Satisfy Any
Only first Require statement is satisfied. If i comment first "Require group admins" then "Require group helpdesk" works, but "Require group weekly" does not work. Any idea why this happening?
Thanks
PAd
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Jerry,
Another stuff i found out. I commented access info in auth_mysql.conf and put the same info in .htaccess and system does not prompts for login/password. Basically its ignoring .htaccess.
Any idea why this is happening??
Thanks
PAd
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, your problem is how you have the groups laid out. They all go in one group entry, i.e.
require group admin helpdesk weekly
A user in any of the three groups should get authorized.
As to MySQL users. Yes, you can use other users. In fact, using root is NOT recommended. You need to define a user to MySQL with (at least) read permissions to the database/table, then change your configuration to the new userid/password. See the MySQL documentation for more info.
As to why .htaccess isn't working: Your httpd.conf file must have AllowOverrride set appropriately for the directory (or directories). See the Apache documentation for AllowOverride for more info.
Hope these get you going.
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am using mod_auth_mysql 2.6.1. I getting "not in right group" message in apache error log. Am i missing any thing here?
Thanks
PAd
Sorry for not giving details. I am using mysql 3.23.58 and Apache 2.0.46 on Redhat enterprise server. I am using already existing database which were used with mod_auth_mysql 2.20 on Redhat 7.3 and apache 1.3.22. If user is in admin group, then login is ok. We have created 4 groups, those are weekly, monthly, admin, helpdesk. The user i am trying to login from is in group weekly and this is when i see "not in right group" in apache error log. The user is in group weekly.
Any help in this matter would be of great help.
Thanks
PAd
Hi, PAd,
It's hard to say what the problem might be without more information. Can you post the relevant entries from your httpd.conf and/or .htaccess files?
I have been looking at another reported problem in this area, but I'm not sure if yours is the same or not.
Thanks,
Jerry
Thanks for the quick response. Below is the entry from /etc/httpd/conf.d/auth_mysql.conf. User 77211 is in the table group table dweekly.
I have one more question regarding parameter AuthMySQLUser AuthMySQLPassword, that it works only with "root" account (the one which is defined in "mysql" DB. Is there a way to use different account other than root. ( iam new to mysql)
LoadModule mysql_auth_module modules/mod_auth_mysql.so
<IfDefine HAVE_AUTH_MYSQL>
AddModule mod_auth_mysql.c
</IfDefine>
<Directory /html/ddata/weekly>
AuthType basic
AuthName "Weekly Access"
AuthMySQLEnable On
AuthMySQLDB authsub
AuthMySQLUser root
AuthMySQLHost localhost
AuthMySQLPassword xxxxxxxx
AuthMySQLUserTable custom
AuthMySQLNameField customerid
AuthMySQLPasswordField password
AuthMySQLGroupTable dweekly
AuthMySQLGroupField groups
AuthMySQLCryptedPasswords off
AuthMySQLAuthoritative On
AuthMySQLKeepAlive On
<Limit GET POST>
order deny,allow
deny from all
Require group admins
Require group helpdesk
Require group weekly
</Limit>
Satisfy Any
</Directory>
Jerry,
This is what i found out. The values
<Limit GET POST>
order deny,allow
deny from all
Require group admins
Require group helpdesk
Require group weekly
</Limit>
Satisfy Any
Only first Require statement is satisfied. If i comment first "Require group admins" then "Require group helpdesk" works, but "Require group weekly" does not work. Any idea why this happening?
Thanks
PAd
Jerry,
Another stuff i found out. I commented access info in auth_mysql.conf and put the same info in .htaccess and system does not prompts for login/password. Basically its ignoring .htaccess.
Any idea why this is happening??
Thanks
PAd
PAd,
OK, your problem is how you have the groups laid out. They all go in one group entry, i.e.
require group admin helpdesk weekly
A user in any of the three groups should get authorized.
As to MySQL users. Yes, you can use other users. In fact, using root is NOT recommended. You need to define a user to MySQL with (at least) read permissions to the database/table, then change your configuration to the new userid/password. See the MySQL documentation for more info.
As to why .htaccess isn't working: Your httpd.conf file must have AllowOverrride set appropriately for the directory (or directories). See the Apache documentation for AllowOverride for more info.
Hope these get you going.
Jerry
Jerry,
Problem solved with Require statement. Thank you very much for your help.
PAd
Glad it's working for you, PAd.
Jerry