On Fri, Feb 10, 2012 at 9:01 PM, Doyal, Charles T CIV NSWCDD, K94
<[email protected]> wrote:
> I am a new Trac user, so please be very specific in your replies.  Sanitized 
> examples are always welcomed.  Thanks.
>
> The executive summary of my problem is that have a single Track install and I 
> need a seperate password file (htpasswd) for each of two projects, and Trac 
> is using a single password file.
>
> In a VM windows environment, I installed Trac 12.2-5.  I thought everything 
> was going well until I added another project and wanted different Trac 
> permissions for different users.  After considerable reading, I have 
> discovered I do not understand how the password file htpasswd is referenced.
>
> In my initial misguided efforts, I notied that whenever I ran htpasswd.exe, 
> the output htpasswd file was be created at
> c:/Users/charles/AppData/Local/VirtualStore/Program Files/BitNami Trac 
> Stack/apps/trac/conf/, and that this htpasswd file had to copied to
> c:/Program Files/BitNami Trac Stack/apps/trac/conf/.  I just figured that 
> since the paths were identical starting at 'Program Files', that I had a path 
> set incorrectly someplace and this was just a trivial problem I would fix 
> later.  I realized my problem and learned how to place the htpasswd file 
> where I wanted.
>
> My projects are located at ...
> c:/Users/charles/BitNami Trac Stack Projects/XXX and
> c:/Users/charles/BitNami Trac Stack Projects/YYY.
>
> Somewhere I was lead to believe that I should create a htpasswd file in each 
> of the two directories noted above, which I did. I supposed that inclusion of 
> the password files in those project directories would overide the file 
> located at c:/Program Files/BitNami Trac Stack/apps/trac/conf.  That is not 
> the case.
>
> How do I get my Trac XXX project to use one password file, and my YYY project 
> to use another password file?  These projects are only accessable from out 
> internal LAN/intranet, so real world protection is not necessary.  I am just 
> trying to keep honest programmers from accidently making a mistake.
>

In the trac.conf file in
c:/Users/charles/AppData/Local/VirtualStore/Program Files/BitNami Trac
Stack/apps/trac/conf/ you can see the following:

<LocationMatch "/trac/[^/]+/login">
  AuthType Basic
  AuthName "Trac"
  AuthUserFile "c:/Users/charles/AppData/Local/VirtualStore/Program
Files/BitNami Trac Stack/apps/trac/conf/htpasswd"
  Require valid-user
</LocationMatch>

The regular expresion "/trac/[^/]+/login" will mach all the projects.
What you is add Location entries for each project each one using a
different htpasswd file:


<Location "/trac/Project1/login">
  AuthType Basic
  AuthName "Trac"
  AuthUserFile "c:/Users/charles/AppData/Local/VirtualStore/Program
Files/BitNami Trac Stack/apps/trac/conf/htpasswd1"
  Require valid-user
</LocationMatch>


<Location "/trac/Project2/login">
  AuthType Basic
  AuthName "Trac"
  AuthUserFile "c:/Users/charles/AppData/Local/VirtualStore/Program
Files/BitNami Trac Stack/apps/trac/conf/htpasswd2"
  Require valid-user
</LocationMatch>


> Thanks,
>
> Charles
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Trac Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/trac-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to