Tags:
create new tag
view all tags

Question

I've been configuring User Authentication as per the installation manual with .htaccess/.htpasswd protection for editing etc, but when a new user registers .htpasswd is not being updated. All the other functions seem to work. The register script is being called because the user is being created in TWiki; I can change the password of an existing user who already has a manually-created entry in .htpasswd; the username/password pairs in .htpasswd are being read and used by apache authentication. It's just new users that are not getting added. I'm at a bit of a loss as to why the register script isn't updating the .htpasswd file? Any ideas?

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat 9, kernel 2.4.20-24.9
Web server: Apache/1.3.27
Perl version: 5.00503
Client OS:  
Web Browser:  

-- ChrisStoddart - 02 Mar 2004 if( $remoteUser ) { htpasswdAddUser( htpasswdGeneratePasswd( $remoteUser, $passwordA ) ); }

Answer

I've figured it out; the register script in /bin contains the line

if( ! $remoteUser ) {

htpasswdAddUser( htpasswdGeneratePasswd( $wikiName, $passwordA ) );

}

for adding to the .htpasswd file. So if you want to use a TWikiRegistration topic that contains an intranet login field, then .htpasswd will never be updated. I commented the '!' out of the if statement above and now it ONLY works provided an intranet login name IS submitted. Since I have made it a compulsory field in my TWikiRegistration topic, there should be no problems.

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2004-03-12 - ChrisStoddart
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.