Tags:
create new tag
view all tags

Question

I’m converting my TWiki from a Linux Konqerer base to a TWikiVMDebianStable24 on a windows box. Installation was easy, and I’ve copied over all the webs and it all seems ok. For Authentication I’ve copied over the .htpasswd and .htaccess files and I’ve configured it to use Basic Authentication however I can’t get it to work, no-one is prompted for their WikiName and password when they log in. With the previous version authentication occurs however I do notice the URL http://ipaddress/twiki/bin/view/Main/WebHome gets redirected to http://ipaddress/twiki/bin/viewauth/Main/WebHome. I suspect this is what is not happening with the new version. I don’t know where this redirect occurs or what drives this to happen but this doesn’t happen with the new version. In the new version If I code viewauth in the URL authentication does occur. The previous version was installed by linux people, unfortunately my expertise is very limited with linux/unix. Any help and advice would be greatly appreciated. EinoVaananen

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: Only default ones at this stage
Server OS: MS WIndows XP SP2
Web server: ?
Perl version: ?
Client OS: DebianStable24
Web Browser: IE6
Categories: Authentication

-- TWikiGuest - 08 Nov 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

You need to enable {ApacheLogin} in your TWiki configuration, using the URL /twiki/bin/configure. You'd probably also need to provide the path to your .htpasswd file if you want passwords to be managed via TWiki.

-- HaraldJoerg - 08 Nov 2007

Using the Configure panels I changed the LoginManager to TWiki::Client::ApacheLogin, and pointed the {Htpasswd}{Filename} to /home/httpd/twiki/data/.htpasswd with no difference, still having the same problem. Any further help or suggestions would be appreciated. Thanks EinoVaananen

-- TWikiGuest - 09 Nov 2007

So, basically this looks right. The setting of TWiki::Client::ApacheLogin is what will cause authenticated requests to be redirected to their *auth equivalents, which per Apache configuration should request a password.

Coming to think of it: You wrote that http://ipaddress/twiki/bin/view/Main/WebHome was being redirected to http://ipaddress/twiki/bin/viewauth/Main/WebHome in your old version. This seems to indicate that you had every access, including view, authenticated, which is not TWiki's default setting.

There are three alternatives how this can be achieved:

  • Deny view access for TWikiGuest on all your webs. However, if you copied all your webs, you would have inherited this setting.
  • In configure, add view to the list of {AuthScripts} in the security section.
  • Generally request authentication for all scripts in bin in the Apache configuration. This apparently was not your setup, because in this case redirection to viewauth isn't necessary.
Good luck!

-- HaraldJoerg - 09 Nov 2007

Apologies for the delay. I did as you suggested Harald however I get the following error message when logging in: Software error:

Password Manager: Can't locate Apache/Htpasswd.pm in @INC (@INC contains: /home/httpd/twiki/lib/CPAN/lib//arch/ /home/httpd/twiki/lib/CPAN/lib//5.8.4/i386-linux-thread-multi/ /home/httpd/twiki/lib/CPAN/lib//5.8.4/ /home/httpd/twiki/lib/CPAN/lib// /home/httpd/twiki/lib . /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl) at /home/httpd/twiki/lib/TWiki/Users/ApacheHtpasswdUser.pm line 21.
BEGIN failed--compilation aborted at /home/httpd/twiki/lib/TWiki/Users/ApacheHtpasswdUser.pm line 21.
Compilation failed in require at (eval 19) line 2.
BEGIN failed--compilation aborted at (eval 19) line 2.
For help, please send mail to the webmaster (webmaster@localhost), giving this error message and the time and date of the error. 
I have got the 'Client Template Login' working ok and prompting for passwords. As this TWiki is behind a corporate firewall for internal use only I am happy with this setup. Thanks for your help.

-- TWikiGuest - 16 Nov 2007

Sorry, I forgot to mention that pitfall: The correct password manager would have been {PasswordManager} = TWiki::Users::HtPasswdUser instead of TWiki::Users::ApacheHtPasswdUser. The help text in bin/configure is not clear enough in that respect. I am somewhat surprised that you get around that hurdle with Template Login, but if you do, then it is fine smile

-- HaraldJoerg - 17 Nov 2007

Change status to:
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-11-17 - HaraldJoerg
 
  • 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.