This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: mkpasswd (Win2K) cannot find the domain controller


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]