> I can't even get Authen::Smb to work on its own.  I wrote (more like
copied)
> a simple test script right out of the perldoc for Authen::Smb and I only
get
> error level one.  Is there something that this depends on that I'm unaware
> of???  Thanks.
>
> Derric L. Tubbs
> [EMAIL PROTECTED]

Consider the following example lifted from the Authen::Smb man page:

   my $authResult = Authen::Smb::authen('myUser',
                                        'myPassword',
                                        'myPDC',
                                        'myBDC',
                                        'myNTDomain');

The PDC and BDC fields serve two purposes.  The value is resolved to an IP
address which is used to find the server on the network (this makes sense,
nothing surprising here.)  But the PDC and BDC fields are also part of the
authentication challenge!!!  Use a value other than what the server is
expecting and your authentication challenge will fail.

For examlpe, if I use a PDC of "foo", then everything will work fine.  But
if I use a fully-qualified PDC of "foo.domain.com" or an IP address of
"123.456.789.123" (all of which, coincidentally, resolve to the same thing),
then I get authentication failures of type 1 like you mentioned above.
(Most people will be quick to realize this scheme is quite braindead.  When
Microsoft reinvents things, they tend to do it quite poorly.)

tcpdump might also help you out in your troublehooting.  Pop open another
xterm (or whatever) on the machine using Authen::Smb.  If your PDC is called
"foo.domain.com", try the following command:

   tcpdump ip and host foo.domain.com

Then watch the traffic to the PDC go by as you make your authentication
challenges.  tcpdump is fun.  Check the man page for more on tcpdump.

Matt

Reply via email to