<br><font size=2 face="sans-serif">Hi all,</font>
<br><font size=2 face="sans-serif"> After collecting data from many resources, I have managed to authenticate RT ver 2.1.88 by use of cookies. I am posting the changes done to the scripts in the hope that someone might find it useful.</font>
<br>
<br><font size=2 face="sans-serif">-Have set cookies in my website for the current user logged in</font>
<br><font size=2 face="sans-serif"> setcookie("user", value); //in php</font>
<br>
<br><font size=2 face="sans-serif">-In file RT_SiteConfig.pm</font>
<br><font size=2 face="sans-serif"> Set($WebExternalAuth, 1);</font>
<br><font size=2 face="sans-serif"> Set($WebExternalAuto, 1);</font>
<br>
<br><font size=2 face="sans-serif">-In file InstallDir/share/html/autohandler</font>
<br><font size=2 face="sans-serif"> //add the 2 lines at the beginning of the file</font>
<br><font size=2 face="sans-serif"> use CGI qw(standard);</font>
<br><font size=2 face="sans-serif"> use CGI::Cookie;</font>
<br>
<br><font size=2 face="sans-serif"> //modify the line for external authentication by removing ($ENV{'REMOTE_USER'}) so it reads</font>
<br><font size=2 face="sans-serif"> elseif ($RT::WebExternalAuth) {</font>
<br>
<br><font size=2 face="sans-serif"> //comment the foll line</font>
<br><font size=2 face="sans-serif"> $user = $ENV{'REMOTE_USER'};</font>
<br><font size=2 face="sans-serif"> // and add these immediately below</font>
<br><font size=2 face="sans-serif"> my $hashref = fetch CGI::Cookie;</font>
<br><font size=2 face="sans-serif"> my %hashval = %$hashref;</font>
<br><font size=2 face="sans-serif"> my $name = $hashval{'user'}->value;</font>
<br><font size=2 face="sans-serif"> $user = $name;</font>
<br>
<br><font size=2 face="sans-serif"> //comment the foll</font>
<br><font size=2 face="sans-serif"> if ($^O !~ /^(?:riscos|MacOS|MSWin32|dos|os2)$/) {</font>
<br><font size=2 face="sans-serif"> #Populate fields with information from Unix /etc/passwd</font>
<br><font size=2 face="sans-serif"> my ($comments, $realname) = (getpwnam($user))[5, 6];</font>
<br><font size=2 face="sans-serif"> $UserObj->SetComments($comments) if defined $comments;</font>
<br><font size=2 face="sans-serif"> $UserObj->SetRealName($realname) if defined $realname;</font>
<br><font size=2 face="sans-serif"> }</font>
<br><font size=2 face="sans-serif"> elsif ($^O eq 'MSWin32' and eval 'use Net::AdminMisc; 1') {</font>
<br><font size=2 face="sans-serif"> # Populate fields with information from NT domain controller</font>
<br><font size=2 face="sans-serif"> }</font>
<br>
<br><font size=2 face="sans-serif">And RT is ready to accept the username passed by the cookie and creats a user in the db if it doesn't already exist or display the home page if user exists. Works like a charm.</font>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif">Parimala.<br>
</font>