[rt-users] Re: AD/NT Authentication
Josiah Ritchie
jritchie at bible.edu
Mon Feb 23 09:15:33 EST 2004
seph scripted ::
>>>Set($WebExternalAuth , 1 );
>>
>> That seemed to only work for users that I already have in the RT
>db.> You got me in the right place though. I found this and it
>finished it> all up.
>
>That's correct, rt still needs to have its own concept of the
>user. I've seen patches to make rt use an external user db, but I
>tend to prefer having rt autocreate users as needed. There's a
>setting that controls whether rt autocreates authenticated web users,
>and an overlayable function (in Interface/Web) that sets the user
>info.
Okay, so /opt/rt3/lib/RT/Interface/Web.pm is where I set default
permissions. I'm guessing that I want to set them when the user is
created in this subroutine (lines 162-192):
sub WebExternalAutoInfo {
my $user = shift;
my %user_info;
$user_info{'Privileged'} = 1;
if ($^O !~ /^(?:riscos|MacOS|MSWin32|dos|os2)$/) {
# Populate fields with information from Unix /etc/passwd
my ($comments, $realname) = (getpwnam($user))[5, 6];
$user_info{'Comments'} = $comments if defined $comments;
$user_info{'RealName'} = $realname if defined $realname;
}
elsif ($^O eq 'MSWin32' and eval 'use Net::AdminMisc; 1') {
# Populate fields with information from NT domain controller
}
# and return the wad of stuff
return {%user_info};
}
# }}}
I'm thinking if I new enough about perl I could pull what I want out
of User_Overlay to add into this and take care of it. Perhaps there is
a better way of doing this anyway. Any pointers or examples would be
appreciated. Thanks, JSR/
More information about the rt-users
mailing list