Menu

not in right group

Help
2004-10-14
2013-04-23
  • Nobody/Anonymous

    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

     
    • Nobody/Anonymous

      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

       
    • Jerry Stuckle

      Jerry Stuckle - 2004-10-14

      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

       
    • Nobody/Anonymous

      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>

       
    • Pad Hosmane

      Pad Hosmane - 2004-10-14

      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

       
    • Pad Hosmane

      Pad Hosmane - 2004-10-14

      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

       
    • Jerry Stuckle

      Jerry Stuckle - 2004-10-14

      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

       
    • Nobody/Anonymous

      Jerry,
         Problem solved with Require statement. Thank you very much for your help.

      PAd

       
    • Jerry Stuckle

      Jerry Stuckle - 2004-10-16

      Glad it's working for you, PAd.

      Jerry

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.