From owner-freebsd-questions Wed Oct 25 12:25:55 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-149-77.mmcable.com [24.27.149.77]) by hub.freebsd.org (Postfix) with SMTP id 0911A37B479 for ; Wed, 25 Oct 2000 12:25:53 -0700 (PDT) Received: (qmail 94038 invoked by uid 100); 25 Oct 2000 19:25:51 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14839.13247.724401.568040@guru.mired.org> Date: Wed, 25 Oct 2000 14:25:51 -0500 (CDT) To: Blake Swensen Cc: questions@freebsd.org Subject: Re: Perl crypt(), htpasswd, and 4.1-RELEASE In-Reply-To: <80382767@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Blake Swensen writes: > Have written a script which uses the perl crypt() command to > create/change passwords as a replacement for htpasswd. This worked > perfectly on 2.1.6-RELEASE, and now that I have upgraded to 4.1-RELEASE > the encryption scheme seems to be different and all of my .htaccess > passwords are broken. > > Can anyone shed some light on what might be happening here? ... htpasswd > will correctly encrypt the password, but perl crypt() will not. > Just FYI, I am using exactly the same version of httpd & htpasswd that > was running on the old 2.1.6 system, restored from backup. And presumably *built* on 2.1.6. Unless you're using a version of Perl from 2.1.6 restored from backup (which is a bad idea), that's almost certainly the problem. Perl is using the 4.1 system crypt() function, but your 2.1.6 binaries have the 2.1.6 system crypt() function. If you recompile httpd, perl's crypt will start working again. If you want to use htpasswd as well, you need to recompile that. However, the old password files used by .htaccess will quit working. 4.1 allows you to chose a number of different schemes for password encryption, and you may be able to fix the problem by fiddling with that, but I'm not familiar with the choices.