http://www.perlmonks.org?node_id=60186

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: (cgi programming)

I have a single Linux server (housing a Perl-based Intranet, of course) living on an NT-dominated network. All users are already NT authenicated. Is there a way to either (1) access the username from this authentication or (2) re-authenticate with the NT server so that I can control access to directories without having to assign a new password to all the users?

Originally posted as a Categorized Question.

  • Comment on Can I use NT authentification for a script running on a Linux server?

Replies are listed 'Best First'.
Re: Can I use NT authentification for a script running on a Linux server?
by ybiC (Prior) on Feb 22, 2001 at 18:11 UTC
    If implementing Kerberos, as offered by good monk ChOas, isn't an option in your environment, here's a pair of modules that together might scratch your itch.   I found them using http://kobesearch.cpan.org/ with query of "authenticate".
    • Apache::AuthenSMB   This perl module is designed to work with mod_perl and the Authen::Smb module by Patrick Michael Kane
    • Authen-SMB   Perl extension to authenticate against an SMB server
        cheers,
        ybiC
Re: Can I use NT authentification for a script running on a Linux server?
by ChOas (Curate) on Feb 22, 2001 at 17:01 UTC
    This is a short answer, but I'm into Unix, not NT
    I would advice you to look into Kerberos (start on google)

    Kerberos is capable of doing cross NT/Unix authentication

    GreetZ!,

      ChOas

Re: Can I use NT authentification for a script running on a Linux server?
by davemabe (Monk) on Feb 22, 2001 at 18:24 UTC
    I looked into this a couple weeks ago, and as I see it here are your options.
    1. Use mod_ntlm in apache. This handles the automatic passthrough NTLM authentication that IE performs.

    2. In a Win2K AD environment, Kerberos can be used. Check out the Kerberos Authentication apache module.
    I am choosing option 2, but we haven't deployed Win2K yet. As soon as we do, that will be my solutions.

    After re-reading your question, I realize that I assume you are using Apache on Linux.

    Dave
Re: Can I use NT authentification for a script running on a Linux server?
by Schuk (Pilgrim) on Jan 04, 2002 at 18:20 UTC
    I also found a nice little solution. In fact it only gives you the nt login name of the client box. You need the IpInfo module which I found in the sources of NBTscan. http://www.inetcat.org/software/nbtscan.html
    use IpInfo; ... my $info = new IpInfo($cur_ipaddr); print $info->nbUserName();
    The module reads out the netbios.
    Schuk