You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Dirk.vanGulik" <Di...@jrc.it> on 1997/07/22 10:13:59 UTC

one for the FAQ

I am getting a wee bit fed up by this. Sat down for
a few hours going through all apache/msql related mail
which I left from thursday. About 28 where in related
to answer 50, 17 went for 51. And I had 2 whining that
their htpasswd files stopped working when they upgraded
to a machine with a different crypt(). 

So here are three for the FAQ.

Dw.

*** FAQ.org	Tue Jul 22 10:05:09 1997
--- FAQ	Tue Jul 22 10:09:30 1997
***************
*** 223,228 ****
--- 223,238 ----
     </LI>
     <LI><A HREF="#msql-slow">Why is my mSQL authentification terribly slow?</A>
     </LI>
+  <LI><A href="#msql-compile">Why do I get errors about msql when compiling?
+      </A>
+    </LI>
+  <LI><A href="#htpasswd-how">How do I make htpasswd/dbm/gdb/msql password entries?
+      </A>
+    </LI>
+  <LI><A href="#htpasswd-help">I've switched/upgraded machines; and now my htpasswd's have stopped working?
+    </LI>
    </OL>
   </LI>
  </UL>
***************
*** 1754,1759 ****
--- 1764,1853 ----
    documentation warn you about this.  If you have to use different
    hosts, check out the <SAMP>mod_auth_msql</SAMP> code for
    some compile time flags which might - or might not - suit you.
+   </P>
+   <HR>
+  </LI>
+  <LI><A NAME="msql-compile">
+       <STRONG>Why do I get errors compiling?</STRONG>
+      </A>
+   <P>
+   When you get errors like <samp>msql.h</samp> not found or something
+ along the line of:
+ <blockquote><pre>
+ mod_auth_msql.o: In function `do_msql_query':
+ mod_auth_msql.o(.text+0x17c): undefined reference to `msqlConnect'
+ ...
+ mod_auth_msql.o(.text+0x418): undefined reference to `msqlClose'
+ make: *** [httpd] Error 1
+ </pre></blockquote>
+ 
+ You propably did not add something along the lines of 
+ <code>'-lmsql -L/usr/local/lib -L/usr/local/Minerva/lib'</code> 
+ to your <code>EXTRA_LIBS</code> line. See the comments the 
+ <samp>src/Configuration</samp> file just above the msql line 
+ you uncommented.
+ 
+   </P>
+   <HR>
+  </LI>
+  <LI><A NAME="htpasswd-how">
+       <STRONG>How do I make htpasswd/dbm/gdb/msql password entries?</STRONG>
+      </A>
+   <P>
+   The various authenfication modules, such as mod_auth, mod_auth_gdb, 
+ mod_auth_dbm, mod_auth_msql and quite a few contributed modules with
+ oracle, postgress and sybase connections rely on a <emp>crypted</emp> 
+ password field. This is a one-way crypt, as are the entries in your
+ normal passwd file on most unix systems. One needs a tool or a bit of
+ perl to create these entries.</p>
+   <p>
+   In the <samp>support</samp> directory of the source distribution you
+ will find (or can compile) a binary 'htpasswd' which is a simple 
+ password file management tool which will create those crypted entries.</p>
+   <p>
+   Another option is to use the bit of perl below;
+ <blockquote><code><pre>
+ #!/usr/local/bin/perl
+ # Export 0/0a dirkx@technologist.com - Tue Jul 22 08:12:48 GMT 1997
+ #
+ if ($#ARGV != -1) {
+ 	print STDERR "usage: $0 (stdin/out only)\n";
+ 	exit -1;
+ 	};
+ 
+ while(<STDIN>) {
+ 	chomp;
+ 	print crypt_passwd($_)."\n";
+ 	};
+ exit 0;
+ 
+ sub to64 {
+         local ($v,$n)=@_; local $s,$a;
+         $a="./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+         while (--$n >=0 ) {
+                 $s.=substr($a,($v % 64),1);
+                 $v>>=6;
+                 };
+         return $s;
+         };
+  
+ sub crypt_passwd {
+         local ($passwd,$salt)=@_;
+         if (!($salt)) {
+                 srand(time);
+                 $salt=to64(rand(64*64),2);
+                 };
+         return crypt($passwd,$salt);
+         };
+ </pre></code></blockquote>
+   </P>
+   <HR>
+  </LI>
+  <LI><A NAME="htpasswd-help">
+       <STRONG>I've switched/upgraded machines; and now my htpasswd's have stopped working?</STRONG>
+      </A>
+   <P>
+   When you upgrade or switch machines, you might find that the new platform
+ has a different crypt() function than the previous one. This means that the encrypted password fields in the htpasswd file or in the SQL database will
+ no longer match. There is normally <b>nothing</b> you can do about this; as you cannot get the original passwords back from the one way crypt and you might
+ have to send your customers a new password. 
+ </p>
+ <p>If you are on one of the BSDs, you might want to read the man pages on 
+ crypt, md5 and export limitations; as it sometimes is possible to replace your systems crypt() function by the old one. This might of course render your /etc/passwd file disfunctional.
    </P>
    <HR>
   </LI>



Re: one for the FAQ

Posted by Brian Behlendorf <br...@organic.com>.
At 01:56 PM 7/22/97 -0700, you wrote:
>We could look for a volunteer tech writer ... 

Related to this, is there something of a list of "positions" we could
solicit for on the mailing we do for 1.3a1?  For example

  NT developer
  tech writer
  release engineer
  CVS experts

etc?  Not that we don't have chops in-house, I'm just wondering if folks
thought there were areas we could use more (beyond just all-around sharp C
coders).

	Brian


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
"Why not?" - TL           brian@organic.com - hyperreal.org - apache.org

Re: one for the FAQ

Posted by Dean Gaudet <dg...@arctic.org>.
We could look for a volunteer tech writer ... 

Dean

On Tue, 22 Jul 1997, Marc Slemko wrote:

> It should be split into sections by topic, perhaps with crossreferences
> between topics.
> 
> Incorporating it into the docs is good, but isn't useful because people
> are too dumb to read docs.  Making them read the FAQ is hard enough.
> 
> Oh, and OS specific things should probably end up in the os-specific pages
> which I will make in 2005.
> 
> On Tue, 22 Jul 1997, Brian Behlendorf wrote:
> 
> > At 10:13 AM 7/22/97 +0200, you wrote:
> > >I am getting a wee bit fed up by this. 
> > 
> > Sounds like maybe the FAQ is simply too long.  We should either
> > 
> > 1) figure out a way to propagate a good chunk of this knowlege into 
> >    the documentation directly
> > 
> > 2) reorganize the FAQ into parts, based on type of problem, type of OS
> >    perhaps, etc.
> > 
> > or combination thereof, I guess.
> > 
> > 	Brian
> > 
> > 
> > --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
> > "Why not?" - TL           brian@organic.com - hyperreal.org - apache.org
> > 
> 
> 


Re: one for the FAQ

Posted by Marc Slemko <ma...@worldgate.com>.
It should be split into sections by topic, perhaps with crossreferences
between topics.

Incorporating it into the docs is good, but isn't useful because people
are too dumb to read docs.  Making them read the FAQ is hard enough.

Oh, and OS specific things should probably end up in the os-specific pages
which I will make in 2005.

On Tue, 22 Jul 1997, Brian Behlendorf wrote:

> At 10:13 AM 7/22/97 +0200, you wrote:
> >I am getting a wee bit fed up by this. 
> 
> Sounds like maybe the FAQ is simply too long.  We should either
> 
> 1) figure out a way to propagate a good chunk of this knowlege into 
>    the documentation directly
> 
> 2) reorganize the FAQ into parts, based on type of problem, type of OS
>    perhaps, etc.
> 
> or combination thereof, I guess.
> 
> 	Brian
> 
> 
> --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
> "Why not?" - TL           brian@organic.com - hyperreal.org - apache.org
> 


Re: one for the FAQ

Posted by Brian Behlendorf <br...@organic.com>.
At 10:13 AM 7/22/97 +0200, you wrote:
>I am getting a wee bit fed up by this. 

Sounds like maybe the FAQ is simply too long.  We should either

1) figure out a way to propagate a good chunk of this knowlege into 
   the documentation directly

2) reorganize the FAQ into parts, based on type of problem, type of OS
   perhaps, etc.

or combination thereof, I guess.

	Brian


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
"Why not?" - TL           brian@organic.com - hyperreal.org - apache.org