Hope you guys are all well today!
Guys i am trying to authnticate a dav directive using mod_auth_mysql and I am having 401 errors. I ahve tried many options and I will paste here some of my configuration:
Apache configuration:
#
# TEST DIRECTORY - MYSQL AUTH
#
<Location /projects/test>
DAV On
AuthMySQLEnable On
<Limit PUT POST COPY PROPFIND PROPPATCH MKCOL COPY MOVE DELETE>
require user test_user
</Limit>
<Limit PROPFIND COPY>
require test_user
</Limit>
</Location>
I have insterted the username into the db using this command:
INSERT INTO users VALUES ('test_user', ENCRYPT('testpass'));
I have also given the authuser select rights on the auth table:
I have tried all AuthMySQLPwEncryption options, none would work - scrambled is the one tom use, i think since i encrypt the passwd in mysql.
I am using Gentoo linux
mysql Ver 12.22 Distrib 4.0.18, for pc-linux-gnu (i686)
Server version: Apache/2.0.55
I cannot think of anything that I have missed. this server works just fine when authenticating against a passwd file, and i have many dav directives with many users logging in, so dav works,
any ideas or comments will be much appreciated!
sorry for the long post,
enjoy your day guys!
thank you
winston
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
Hope you guys are all well today!
Guys i am trying to authnticate a dav directive using mod_auth_mysql and I am having 401 errors. I ahve tried many options and I will paste here some of my configuration:
Apache configuration:
#
# TEST DIRECTORY - MYSQL AUTH
#
<Location /projects/test>
DAV On
AuthMySQLEnable On
AuthType Basic
AuthName "TEST - MYSQL_AUTH"
AuthMySQLUser authuser
AuthMySQLPassword authpassword
AuthMySQLHost localhost
AuthMySQLPort 3306
AuthMySQLDB auth
AuthMySQLPwEncryption scrambled
AuthMySQLAuthoritative On
AuthMySQLUserTable users
AuthMySQLNameField user_name
AuthMySQLPasswordField user_passwd
AuthMySQLGroupTable groups
AuthMySQLGroupField user_group
DAVDepthInfinity off
LimitXMLRequestBody 100000
<Limit PUT POST COPY PROPFIND PROPPATCH MKCOL COPY MOVE DELETE>
require user test_user
</Limit>
<Limit PROPFIND COPY>
require test_user
</Limit>
</Location>
I have insterted the username into the db using this command:
INSERT INTO users VALUES ('test_user', ENCRYPT('testpass'));
I have also given the authuser select rights on the auth table:
I have tried all AuthMySQLPwEncryption options, none would work - scrambled is the one tom use, i think since i encrypt the passwd in mysql.
Apache is built with the following options:
Server version: Apache/2.0.55
Server built: Nov 22 2005 12:27:09
Server's Module Magic Number: 20020903:11
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr"
-D SUEXEC_BIN="/usr/sbin/suexec2"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache2/httpd.conf"
Software Versions:
I am using Gentoo linux
mysql Ver 12.22 Distrib 4.0.18, for pc-linux-gnu (i686)
Server version: Apache/2.0.55
I cannot think of anything that I have missed. this server works just fine when authenticating against a passwd file, and i have many dav directives with many users logging in, so dav works,
any ideas or comments will be much appreciated!
sorry for the long post,
enjoy your day guys!
thank you
winston
Always check your Apache logs for any errors messages. They will give you more details on what filed.
In your case you should be using
AuthMySQLPwEncryption crypt
Scrambled is a different encryption method.