Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

( #60186=categorized question: print w/ replies, xml ) Need Help??
Contributed by Anonymous Monk on Feb 22, 2001 at 16:52 UTC
Q&A  > CGI programming


Description:

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?

Answer: Can I use NT authentification for a script running on a Linux server?
contributed by ybiC

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
Answer: Can I use NT authentification for a script running on a Linux server?
contributed by ChOas

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

Answer: Can I use NT authentification for a script running on a Linux server?
contributed by davemabe

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

Answer: Can I use NT authentification for a script running on a Linux server?
contributed by Schuk

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

Please (register and) log in if you wish to add an answer



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (19)
    As of 2015-07-28 14:26 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (256 votes), past polls