Question
I can register a new user but I cannot log in as that user. On investigation there is no new entry being written to the data/.htpasswd file. The file is writable by world.
Any advice appreciated! Ta, M.
--
MartinCleaver - 24 Jan 2001
Answer
Make sure you are using the correct registration form that asks for typing in the password two times. You need to rename the TWikiRegistrationPub topic, more in
TWikiInstallationGuide. Check out also
TWikiOnSourceForge.
--
PeterThoeny - 26 Jan 2001
The
TWikiInstallationGuide have the answer but you have to read carefully. I could only get the process to work when the .htpasswd file was owned by
nobody. You would be wise the check the path as well in wikicfg.pm
--
DavidCBuchan - 14 Feb 2001
Don't think it applies in this case, but it was one of my problems - If your ".htpasswd" file has another name or doesn't reside in your data directory, you'll need to either change $htpasswdFilename in your wikicfg.pm file or move/rename your ".htpasswd" file.
--
AndyPryke - 06 Apr 2001
I had this problem too. The .htpasswd has to be owned by
nobody. Just giving
rw privileges to everyone didn't work.
On my server, I don't have permission to chown to nobody, so I wrote a little CGI script in the twiki/bin directory that created the file and put the
TWikiGuest user's password in it. The
TWikiOnSourceForge has some examples of this technique, but here was my solution:
#!/bin/sh
htpasswd -bc /path/to/TWiki/data/.htpasswd TWikiGuest guest
echo "Content-type: text/html"
echo ""
echo "<html><head><title>Fix-It</title></head>"
echo "<body>Okay, it's fixed</body>"
echo "</html>"
exit 0
--
KristopherJohnson - 09 Apr 2001
Had a similar problem with new user .htaccess registration not being recognized on log-in. I think I created a workaround rather than a solution without realizing it, or the real problem. My process:
- First, manually create new user directly in .htaccess (thru Linux shell)
- Second, register in TWiki with TWikiRegistrationPub form and same password (I also make usr a WikiName and re-use it also)
The order is crucial. I had to delete existing TWiki accounts, create them in .htaccess, then re-register them in TWiki to get things working.
There may've been an ownership problem as discussed above. But I'd found a cool browser-based Perl htaccess manager to create-modify-delete for groups and users, and protect/unprotect for directories, for my entire site, from one control panel. So I went for that approach. Now, this two-step is an advantage.
Also, I'm running TWiki Dec2000 on a Linux/Apache ISP virtual domain, where the public www site is a subdirectory of the domain account - sensitive files can live outside the web server:
mydomain.com = mydomain/www/
mydomain/.htpasswd
mydomain/.htgroup
The master htaccess control is working fine, for TWiki and a couple of other protected areas. Whatever I've done, it all seems to work. (If something's not right, please lemme know!)
--
MikeMannix - 12 Apr 2001