Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <64F0F24E4646E644B6AF14331D69F841D0570A@orsmsx403.jf.intel.com> From: "Lafond, Kenneth G" To: cygwin AT cygwin DOT com Subject: Bug in userIDs in large domains in Cygwin 1.3.22-1 Date: Mon, 28 Apr 2003 12:27:20 -0700 MIME-Version: 1.0 content-class: urn:content-classes:message Content-Type: text/plain; charset="iso-8859-1" I originally started this thread on the cygwin-xfree mailing list since it seemed that's where the issue was, but upon finding the root cause of the issue it turns out it is more appropriate to post here. This bug/limitation has implications for many Cygwin features, including XFree86 and many tools/apps, although I think the root of the issue best applies to this list. There is a limitation in Cygwin in for userIDs (although it may actually lie within 'id'). I've found the issue. Here was the problem: The Cygwin installer gave me a user ID of 190965 (in /etc/passwd). That's 10000 more than in my SID. The group also got 10000 added to it, so I'm assuming this is a magic number indicating a domain account (which I have - a LARGE domain). Whenever I tried to log in, I'd always get the error I described below: "id: cannot find name for user ID 59893" and " I have no name!@ $ " I didn't know where the 59893 was coming from. After much messing around I noticed that the number in the error tracker the userID. I finally decided to change my userID to 1 in /etc/passwd to see what number I got back from 'id' - and the whole thing JUST WORKED. I was suprised, so I did some testing to make sure it works, and then did a little math: My ID was 190956, minus the error given 59893 gives: 19065-59893 = 131072. From the ntsec discussion on the web, "If another user (or a Windows group, treated as a user) is not present in /etc/passwd, the user id of that user will have a special value of -1 (which would be shown by ls as 65535)." I knew the point at which a positive number becomes negative (ie Cygwin uses a SHORT for the userID) it's at 65535. Add one to 65535 because 0 is one of the integers. Well, guess what: 65536*2 = 131072. That matches the number above and finds the relationship and discrepency between the 'id' error and my user ID. Changing the user ID to 1 made it smaller than the critical wrapping number and so it works. It works with any ID between 1 and 65534 (65535 is the ?????? user per the ntsec docs, and 65536 starts this wrapping bug giving an error of not being able to find user 0). Wrapping issues are not uncommon - rsync and pop3 had the same problem about a year or two ago. Suggestion: Extend the userID field to be an INT instead of a SHORT. That'll give 2147483648 users before we run into problems. If the issue is with 'id' then maybe someone can tell me who to talk to to fix it? Kenneth G Lafond System Validation Group Validation Lead Intel Corporation There are 10 kinds of people in this world: Those who understand binary, and those who don't. -----Original Message----- From: Lafond, Kenneth G Sent: Monday, April 28, 2003 10:06 AM To: cygwin-xfree AT cygwin DOT com Subject: RE: X works, but xterm doesn't stay open I think I found part of the bug. Does anyone know the maximum number of users (ie the highest UID) Cygwin can handle before 'wrapping', specifically in a domain environment? Ken -----Original Message----- From: Lafond, Kenneth G Sent: Friday, April 25, 2003 3:06 PM To: cygwin-xfree AT cygwin DOT com Subject: X works, but xterm doesn't stay open > Hey all - > I'm new to Cygwin. I've searched the web for two days, and have gone through the archives and FAQ without finding the answer to my issue. > > I have the latest Cygwin 1.3.22-1, running on Windows 2000 Sp2. I've installed all default items as well as a few others (like vim) and the full XFree subcategory. This is a fresh install. > > The symptoms: The bash shell when launched form the desktop icon works fine (mostly). It does say that "id: cannot find name for user ID 59893" and " I have no name!@ $ ". I don't know if this is a problem for xterm, since I've seen rumblings of a user/SID problem in the lists that's supposed to be fixed by a later release (which I have the latest), so I *guessing* that this is not an issue. (although if you know how to fix it, please let me know) > I used the default startxwin.bat to start X, and it came up and initialized twm and I got the outline for xterm, but when I placed the window it disappeared. I started xterm again from within twm with the same result. I set the DISPLAY variable from the bash shell (launched from windows) and tried again with the same result. > So, I changed the startxwin.bat to start wmaker instead. I got the same result with the xterm (opens and immediately closes). I'm able to run the calculator and prefrences windows in wmaker just fine, but xterm will not stay open from X or from the windows bash shell (making this slightly different symptoms than I've seen already in the list archives). > There are no error messages or error files for me to analyze (that I can find anyway). Any idea what's going on? I've posted the Xwinrl.log and the setup.log below. > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/