Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The GID and UID numbers Cygwin uses may change after a computer is joined to Active Directory.
Also, depending on the version of Cygwin the format of the resulting output from mkpasswd -l and mkgroup -l may differ. As a result, the operations performed by update_cygwin.cmd may fail to allow the sshd service to work correctly. Example:
Cygwin 1.5, output the same whether or not computer is joined to AD:
root:unused_by_nt/2000/xp:1000:513:U-VCLV98-247\root,S-1-5-21-4145529145-2666226658-940326903-1000:/home/root:/bin/bash
Note: the UID 1000 corresponds to the Windows numeric identifier for the user account. GID 513 represents the None group.
Cygwin 2.2, computer not joined to AD:
root:*:197609:197152:U-WIN10ENT\root,S-1-5-21-57237294-3426833820-2376726728-1001:/hom e/root:/bin/bash
Note: the UID and GID numbers changed. AFAIK, the 197152 GID is fixed and still corresponds to the None group.
Cygwin 2.8, computer joined to AD:
VCLV98-249+root:*:197609:197152:U-VCLV98-249\root,S-1-5-21-57237294-3426833820-2376726728-1001:/home/root:/bin/bash
Note: the computer name is prepended to the beginning of the line. This is also the case for the line corresponding to the None group produced by the mkgroup command:
Users:S-1-5-32-545:545: VCLV98-249+None:S-1-5-21-57237294-3426833820-2376726728-513:197121:
I also noticed problems caused by the way the vcld backend code configures computers prior to a reboot or capture. Each may add a startup scheduled task – VCL Update Cygwin and VCL Post Load respectively. These may run at the same time. Both call update_cygwin.cmd (post load does a few additional steps). Problems occur if multiple instances of update_cygwin.cmd runs at the same time. Contained in the script are commands to delete existing host key files and then regenerate them. The regenerate command hangs if the key file it is trying to create already exists. This causes that instance of update_cygwin.cmd to hang indefinitely.