Question
Hi there,
I got to work today and found that, even logged in as
TWikiAdminUser, every edit I try to make is accompanied by a prompt to login again. I do not recall having changed anything system-wise on the TWiki server, although we have been doing work on the wiki structure itself. Still, shouldn't the session still be there? What could cause the session to disappear?
Thanks,
Edit:
Additional info: from /var/log/httpd/error_log (I was already logged in as
TWikiAdminUser and went to an arbitrary Web/Topic and clicked Edit)
[Tue Jul 29 11:01:34 2008] [error] [client 10.10.250.145] user admin not found: /twiki/bin/edit/MyCompany/Operations/StorageHardware, referer:
http://wiki/twiki/bin/view/MyCompany/Operations/StorageHardware
[Tue Jul 29 11:01:38 2008] [error] [client 10.10.250.145] user admin not found: /twiki/bin/edit/MyCompany/Operations/StorageHardware, referer:
http://wiki/twiki/bin/view/MyCompany/Operations/StorageHardware
[Tue Jul 29 11:02:04 2008] [error] [client 10.10.250.145] user
TWikiAdminUser not found: /twiki/bin/edit/MyCompany/Operations/StorageHardware, referer:
http://wiki/twiki/bin/view/MyCompany/Operations/StorageHardware
[Tue Jul 29 11:02:59 2008] [error] [client 10.10.250.163] user admin not found: /twiki/bin/edit/Main/TWikiAdminGroup, referer:
http://wiki/twiki/bin/view/Main/TWikiAdminGroup
Environment
--
AdamKadmon - 29 Jul 2008
Answer
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.
Try fully-qualifying your URL, like
http://wiki.intranet.lan/...
instead of just
http://wiki/...
HTTP cookies require fully-qualified domain names. Without the TWIKISID cookie, it can't tell that you already logged in.
--
SeanCMorgan - 29 Jul 2008
Hi Sean, thanks for the suggestion. Here is the result (from /var/log/httpd/error_log):
[Tue Jul 29 11:42:17 2008] [error] [client 10.10.250.145] user admin not found: /twiki/bin/edit/MyCompany/WebHome, referer:
http://cotwiki01.co.mycompany.net/twiki/bin/view/MyCompany/WebHome
[Tue Jul 29 11:43:26 2008] [error] [client 10.10.250.145] user
TWikiAdminUser not found: /twiki/bin/edit/VoiceLog/WebHome, referer:
http://cotwiki01.co.mycompany.net/twiki/bin/view/MyCompany/WebHome
[Tue Jul 29 11:43:32 2008] [error] [client 10.10.250.145] user admin not found: /twiki/bin/edit/MyCompany/WebHome, referer:
http://cotwiki01.co.mycompany.net/twiki/bin/view/MyCompany/WebHome
Definitely using FQDN, and still logged in as the built-in local twiki admin.
Thanks again.
--
AdamKadmon - 29 Jul 2008
Hi. Adam, I'm having the same problem as you did but I didn't figure out quite well what did you do to make it work. Would you lend me a hand here?? I'm having the prompt dialog constantly appearing. No username and/or password seems right...Thanx
--
JuanLussich - 31 Jul 2008
Hey there Juan. It still prompts me more than it ought to, but I reduced the instances of it occurring by setting
DefaultUrlHost to the FQDN of my system. (I was using the short name prior to the suggestion by SeanCMorgan)
Hope this helps.
--
AdamKadmon - 31 Jul 2008
Mmm...I´m afraid I can't use FQDN cos my machine ain't in no domain. Anyway, in the meantime the login dialog keeps prompting and doesn't work even for registered users!!....so I guess I'll have to resolve that first
--
JuanLussich - 31 Jul 2008
Adam, do you have the CPAN module
CGI::Session
installed? You can check that in Configure > Environment variables.
Juan, so I guess you are using IP address then? You might see if it makes a difference if you fake an FQDN with an entry in the client's /etc/hosts file, and set
{DefaultUrlHost}
as Adam indicated. You'll need to add it to
{PermittedRedirectHostUrls}
as well.
--
SeanCMorgan - 31 Jul 2008
Hi Sean, I do have CGI::Session installed, although I believe it is from an
CentOS repository instead of CPAN. (I read somewhere on this site someone suggesting not using the CPAN modules... I really don't know if there is a difference...)
Below is the output of configure. Thanks.
TWiki module in @INC path TWiki.pm (Version: TWiki-4.2.0, Tue, 22 Jan 2008, build 16278) found
Perl modules
B::Deparse 0.71 installed
Data::Dumper 2.121 installed
FileHandle 2.01 installed
File::Basename 2.74 installed
File::Glob 1.05 installed
File::Path 1.08 installed
File::Spec 3.12 installed
File::Temp 0.16 installed
MIME::Base64 3.07 installed
POSIX 1.09 installed
Socket 1.78 installed
Archive::Tar 1.30 installed
CGI::Cookie 1.28 installed
CGI::Session 4.35 installed
Locale::Maketext::Lexicon 0.66 installed
Net::SMTP 2.29 installed
Apache::Htpasswd 1.8 installed
Digest::MD5 2.36 installed
Digest::SHA1 2.11 installed
Encode 2.12 installed
Encode::compat Not installed. may be required for international characters
Getopt::Long 2.35 installed
I18N::Langinfo 0.02 installed
Lingua::EN::Sentence Not installed. may be required for generating new language files
Unicode::MapUTF8 1.11 installed
Win32::Console Not installed. may be required for Windows
--
AdamKadmon - 31 Jul 2008
I just noticed something interesting about
CentOS: the most recent version of CGI::Session one may obtain via yum (with rpmforge) is 4.32.1 whereas the most recent on CPAN is 4.35. Interesting... Should I down-rev CGI::Session to 4.32.1 or leave it at 4.35?
Thanks.
--
AdamKadmon - 31 Jul 2008
I don't know if there is a version issue with
CGI::Session
. I was checking you had it, because it doesn't come with the Windows install (I don't know the Linux install).
The key differences to my set-up are:
CGI::Cookie 1.27 installed
CGI::Session 4.20 installed
Apache::Htpasswd Not installed. may be required for ApacheHtpasswd password manager
Maybe it's something with your
Apache::Htpasswd
? Obviously I'm using Windows authentication instead:
AuthType SSPI
Do you have this config setting?
$TWiki::cfg{UseClientSessions} = 1;
--
SeanCMorgan - 31 Jul 2008
The following are from ../twiki/lib/LocalSite.cfg
$TWiki::cfg{UseClientSessions} = 1;
$TWiki::cfg{Sessions}{ExpireAfter} = 21600;
$TWiki::cfg{Sessions}{ExpireCookiesAfter} = 0;
$TWiki::cfg{Sessions}{IDsInURLs} = 0;
$TWiki::cfg{Sessions}{UseIPMatching} = 1;
$TWiki::cfg{Sessions}{MapIP2SID} = 0;
--
AdamKadmon - 31 Jul 2008
Hi. The apache's config file is slightly different if you select apache login or template login from
http://twiki.org/cgi-bin/view/TWiki/ApacheConfigGenerator. Therefore, when you change the authentification method later on with configure, you might need to hack the apache's config file accordingly.
--
OlivierThompson - 20 Aug 2008
--
OlivierThompson - 28 Sep 2008