.htaccess question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JDog
    Confirmed User
    • Feb 2003
    • 7453

    #1

    .htaccess question

    Is it possible to list multiple .htpasswd files in a .htaccess, kindof like:

    AuthType Basic
    AuthName Members
    AuthDBMUserFile /usr/local/htpasswd.db
    AuthDBMUserFile /usr/local/testing.db
    AuthGroupFile /dev/null
    require valid-user


    Would anybody know this?

    jDoG
    NSCash now powering ReelProfits.com
    ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
    PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
    NOW OFFERING OVER 60 SITES
    CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)
  • funkmaster
    So Fucking Banned
    • Sep 2001
    • 7938

    #2
    well, you do actually have only one .htpasswd file, but more than just one user in it. this way you wouldn´t have to link it to a database.

    ... but I have no idea if you could actually link it to a database ...

    Comment

    • 4Pics
      Confirmed User
      • Dec 2001
      • 7952

      #3
      I dont believe you can do that.

      But you can use a custom solution with mysql to accomplish what you want.

      Comment

      • Jeffery
        Confirmed User
        • Nov 2002
        • 485

        #4
        No, you can't, but there are tools that will combine two htpasswd files. Look around for that. Try cgi-resources.com
        icq: 20427689
        AWGTrade - Free C-coded traffic management system

        Comment

        • Stramm
          Confirmed User
          • Jan 2003
          • 342

          #5
          there's an apache mod for that.. it's free and called mod_auth

          do a search for it

          Comment

          • vending_machine
            Confirmed User
            • Jun 2002
            • 1070

            #6
            Originally posted by Stramm
            there's an apache mod for that.. it's free and called mod_auth

            do a search for it
            Did you even read his question... ?


            JDog; No, you cannot have two different password databases for one directory. If you can, try to merge the two instead, or look at using mod_auth_mysql and doing some trickery with that instead.

            Comment

            • NetRodent
              Confirmed User
              • Jan 2002
              • 3985

              #7
              Originally posted by vending_machine


              Did you even read his question... ?


              JDog; No, you cannot have two different password databases for one directory. If you can, try to merge the two instead, or look at using mod_auth_mysql and doing some trickery with that instead.
              Actually there is an apache mod (written by someone from here I think) that will allow multiple .htpasswd files.
              "Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats."
              --H.L. Mencken

              Comment

              • JDog
                Confirmed User
                • Feb 2003
                • 7453

                #8
                Thanks for the reply's a couple understood it others didn't. I'm not using .htpasswd where the password file looks like:

                user:encyptedpassword

                I'm using DBM files which is using the mod_dbmauth (or whatever the exact module is). What I'm trying to figure out is if there is a way that I could look into one password file for a username/password and if it isn't in that one, look to see if the username/password is valid in the second one, and the same for the third.

                This is why I'm doing this, I'm setting up three processors with MPA2. And I dont' want the processors to overwrite usernames!

                jDoG
                NSCash now powering ReelProfits.com
                ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
                PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
                NOW OFFERING OVER 60 SITES
                CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)

                Comment

                • vending_machine
                  Confirmed User
                  • Jun 2002
                  • 1070

                  #9
                  Originally posted by JDog
                  Thanks for the reply's a couple understood it others didn't. I'm not using .htpasswd where the password file looks like:

                  user:encyptedpassword

                  I'm using DBM files which is using the mod_dbmauth (or whatever the exact module is). What I'm trying to figure out is if there is a way that I could look into one password file for a username/password and if it isn't in that one, look to see if the username/password is valid in the second one, and the same for the third.

                  This is why I'm doing this, I'm setting up three processors with MPA2. And I dont' want the processors to overwrite usernames!

                  jDoG
                  The way this is done in 99% of the cases is just to merge the password files every 5 or so minutes. Unless you want to spend time creating a cusomized solution, the merging option is by far the easiest and cheapest way to go.

                  All the different processors should assign unique random usernames in order to not create collisions. Having multiple identical usernames for the same site is a bad bad idea.

                  Comment

                  • fiveyes
                    Confirmed User
                    • Aug 2001
                    • 1680

                    #10
                    http://forums.devshed.com/archive/15/2002/05/1/35020

                    Whenever I find myself considering a concept that can't be implemented, I realize it's time to go back and look at why I wanted to do it in the first place. Without fail, I've always realized I was looking for a solution to the wrong problem.

                    In your specific case, you just need file locking, where only one process can update the .htpasswd file at a time. Anything else is going to cause you more headaches than you realize.
                    <CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

                    <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>

                    Comment

                    Working...