1
kilkus
htpasswd auth system
  • 2006/4/19 0:17

  • kilkus

  • Just popping in

  • Posts: 1

  • Since: 2006/4/19


Hi, is there any way to add username and password to a .htpasswd file when a user registers?

2
byu_xj
Re: htpasswd auth system
  • 2006/5/4 15:31

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


I am looking for the same solution. I thought that there would be a module for this but I have not found one yet.

The WEBDAV link with SUBVERSION in it basic form uses htaccess files. You create username password combinations with with

% htpasswd2

I was hoping to find a module that would write XOOPS usernames and passwords to a file for this type of htaccess. This way you could use XOOPS access control on your subversion repositories.


The alternative would be for me to learn how to get htaccess to querry the XOOPS database. I have not figured this out either.

3
m0nty
Re: htpasswd auth system
  • 2006/5/4 16:17

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


nope, htpasswd do not use md5 encryption.

it would be pointless getting htpasswd to access the db anyway as it couldn't read the pw even if it could.. but htaccess can't query db's anyway..

4
byu_xj
Re: htpasswd auth system
  • 2006/5/4 18:15

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


Here is what I am looking for. I will see if I can implement this to access a XOOPS database.

http://www.svnforum.org/2017/viewtopic.php?t=730&sid=00051f6193e7d3257f4756b8afc2e60d


Here is the entry for the <location /svn> </location> tag.

<Location /svn>
  
DAV svn
  SVNPath 
/path/repository
  AuthType Basic
  AuthName 
"Subversion repository"
  
Auth_MySQL_Username sql_user
  Auth_MySQL_Password sql_pw
  Auth_MySQL_DB sql_db
  Auth_MySQL_Password_Table sql_table
  Auth_MySQL_Username_Field username
  Auth_MySQL_Password_Field password
  Auth_MYSQL_Group_Table sql_table
  Auth_MYSQL_Group_Field group
  Auth_MySQL_Encrypted_Passwords On
  Auth_MySQL_Non_Persistent On
  Auth_MYSQL_Empty_Passwords Off
  Auth_MySQL On
  
Require valid-user
  
<LimitExcept GET PROPFIND OPTIONS REPORT>
    Require 
group admin
  
</LimitExcept>
</
Location>
<
Location /svn/trunk>
  Require 
valid-user
  Satisfy Any
  
<LimitExcept GET PROPFIND OPTIONS REPORT>
    Require 
group admin
  
</LimitExcept>
</
Location>
<
Location /svn/branches/testing>
  Require 
valid-user
  
<LimitExcept GET PROPFIND OPTIONS REPORT>
    Require 
group admin groupa
  
</LimitExcept>
</
Location>


In the above the "sql_user" and "sql_pw" is a MySQL user that has the ability to select from the "sql_db".

My myql querry skills are not that strong so I will probably fumble around with this for some time before it is perfect but I think that it is a step in the right direction.

5
byu_xj
Re: htpasswd auth system
  • 2006/5/4 19:43

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


Making progress. I now have authorization via a MySQL database. It is a test database but it works.

Here are my settings in 47_mod_dav_svn.conf (This is the apache subversion configuration file)

<IfDefine SVN>
        <
IfModule !mod_dav_svn.c>
<
IfDefine SVN>
        <
IfModule !mod_dav_svn.c>
                
LoadModule dav_svn_module       modules/mod_dav_svn.so
        
</IfModule>
        <
Location /svn>
                
DAV svn
                SVNParentPath 
/usr/data/repository/
                
AuthType Basic
                AuthName 
"Subversion repository"
                
SSLRequireSSL
                
#AuthUserFile /var/svn/conf/svnusers
                
AuthMySQLUser authuser
                AuthMySQLPassword PaSsW0Rd
                AuthMySQLDB auth
                AuthMySQLUserTable users
                AuthMySQLNameField user_name
                AuthMySQLPasswordField user_passwd
                
Require valid-user
        
</Location>
        <
IfDefine SVN_AUTHZ>
                <
IfModule !mod_authz_svn.c>
                        
LoadModule authz_svn_module     modules/mod_authz_svn.so
                
</IfModule>
        </
IfDefine>
</
IfDefine>

6
byu_xj
Re: htpasswd auth system
  • 2006/5/4 20:12

  • byu_xj

  • Just popping in

  • Posts: 13

  • Since: 2006/1/11


Ok now I am stuck.

Here is what I have:

AuthMySQLDB my_xoopsdb
AuthMySQLUserTable xxxx_users
AuthMySQLNameField uname
AuthMySQLPasswordField pass

Am I using the correct entries for

AuthMySQLNameField uname
AuthMySQLPasswordField pass

I have checked the access for this database from the commandline and it will work. I am not certain what other thing I could be missing.

Edit:
I also checkout the directive

AuthMySQLPwEncryption md5

Is this the correct encryption? Here are the options

AuthMySQLPwEncryption none | crypt | scrambled | md5 | aes | sha1

Login

Who's Online

126 user(s) are online (68 user(s) are browsing Support Forums)


Members: 0


Guests: 126


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits