delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/05/08/15:42:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Gerald S. Williams" <gsw AT agere DOT com>
To: "Michael A Chase" <mchase AT ix DOT netcom DOT com>, <cygwin AT cygwin DOT com>
Subject: RE: mkpasswd (Win2K) cannot find the domain controller
Date: Wed, 8 May 2002 15:41:29 -0400
Message-ID: <GBEGLOMMCLDACBPKDIHFOECPCIAA.gsw@agere.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
In-reply-to: <E175WFc-0002Ie-00@granger.mail.mindspring.net>
Importance: Normal

Michael A Chase wrote:
> Can you tell us what the exact values of $USERNAME and $USERDOMAIN are?  If
> they contain spaces or some other odd characters, they may need to be quoted.

It's nothing like that--both are short and all-letters. I have some
more information, though.

I tweaked mkpasswd.c and recompiled it, and discovered a few things:

 - It *was* insisting on contacting a PDC (using NetGetDCName). I
   changed it to use NetGetAnyDCName, which will get a BDC if need be.

 - This changed the error messages. Now I get the following:
   $ ./mkpasswd -d -u $USERNAME
   mkpasswd: [1311] There are currently no logon servers available to service the logon request.
   $ ./mkpasswd -d -u $USERNAME $USERDOMAIN
   mkpasswd: [1355] The specified domain either does not exist or could not be contacted.

This seems a bit more telling. I also verified that it is in
fact the call to NetGetAnyDCName/NetGetDCName that is failing.

I also noticed that the DOMAIN that my computer is logged into
is not the same domain as the user accounts (i.e., the one you
specify when you log into the computer). They are peers, so that
everyone in the company can log into a single network, but only
computers on the same site are considered "local". When I use
the computer domain name, I get this:
   $ ./mkpasswd -d -u $USERNAME computer_domain
   mkpasswd: [1311] There are currently no logon servers available to service the logon request.

It's starting to look like the problem is with our network
configuration (wouldn't be the first time). Of course, that
would be extremely difficult for me to change, since this
certainly affects our security settings. I'm probably at
least going to need some sort of workaround for this.

Meanwhile, I'm wondering if a change similar to the patch
below should be made to mkpasswd.c?

-Jerry

Index: mkpasswd.c
===================================================================
RCS file: /cvs/src/src/winsup/utils/mkpasswd.c,v
retrieving revision 1.21
diff -u -r1.21 mkpasswd.c
--- mkpasswd.c	29 Apr 2002 10:21:54 -0000	1.21
+++ mkpasswd.c	8 May 2002 19:36:14 -0000
@@ -50,7 +50,7 @@
     return FALSE;
   if (!(netlocalgroupenum = (void *) GetProcAddress (h, "NetLocalGroupEnum")))
     return FALSE;
-  if (!(netgetdcname = (void *) GetProcAddress (h, "NetGetDCName")))
+  if (!(netgetdcname = (void *) GetProcAddress (h, "NetGetAnyDCName")))
     return FALSE;
   if (!(netusergetinfo = (void *) GetProcAddress (h, "NetUserGetInfo")))
     return FALSE;


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019