Subject: RE: cygwin & opensshd on .net enterprise server
From: "Tony Hain" <[email-masked]>
To: "Prentis Brooks" <[email-masked]>
Cc: "Ulrich Voss" <[email-masked]>, <[email-masked]>, <[email-masked]>
Date: Fri, 17 May 2002 15:00:38 -0700

Well I found a way to get the process to stay alive by setting the shell
in /etc/passwd to: /cygdrive/c/win-es/system32/cmd.exe   Since I believe
the passwd/group & account info would all have to be aligned for a
successful login to work, I would like to look elsewhere for the issue
with the cygwin shells exiting.

Another thread mentioned cygcheck -s -r -v, so I am including that.  The
only thing that stands out to the untrained eye is that the registry
entries for mounts under current user and terminal server are empty,
while local machine has values that make sense. Is there a script that
might have failed to run that would set the other entries?

Tony

C:\>cygcheck -s -r -v

Cygwin Win95/NT Configuration Diagnostics
Current System Time: Fri May 17 14:41:53 2002

Windows .NET Enterprise Server Ver 5.1 Build 3615 Service Pack 1

Path:   C:\WIN-ES\system32
        C:\WIN-ES
        C:\WIN-ES\System32\Wbem
        c:\cmds
        C:\Program Files\Resource Pro Kit
        C:\Program Files\Microsoft Visual Studio\VC98\Bin
        C:\Program Files\Microsoft Visual Studio\common\msdev98\bin
        c:\cygroot\bin

SysDir: C:\WIN-ES\System32
WinDir: C:\Documents and Settings\ahain\WINDOWS

CYGWIN = `tty'
Path =
`C:\WIN-ES\system32;C:\WIN-ES;C:\WIN-ES\System32\Wbem;c:\cmds;C:\Program
Files\Resource Pro Kit;C:\Program Files\Microsoft Visual
Studio\VC98\Bin;C:\Prog
ram Files\Microsoft Visual Studio\common\msdev98\bin;c:\cygroot\bin'

ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
APPDATA = `C:\Documents and Settings\ahain\Application Data'
CLIENTNAME = `EAGLES-WINGS'
ClusterLog = `C:\WIN-ES\Cluster\cluster.log'
CommonProgramFiles = `C:\Program Files\Common Files'
COMPUTERNAME = `LIBRARY'
ComSpec = `C:\WIN-ES\system32\cmd.exe'
HOMEDRIVE = `C:'
HOMEPATH = `\Documents and Settings\ahain'
LOGONSERVER = `\\LIBRARY'
NUMBER_OF_PROCESSORS = `2'
OS = `Windows_NT'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 7 Stepping 3, GenuineIntel'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0703'
ProgramFiles = `C:\Program Files'
PROMPT = `$P$G'
SESSIONNAME = `RDP-Tcp#1'
SystemDrive = `C:'
SystemRoot = `C:\WIN-ES'
TEMP = `C:\DOCUME~1\ahain\LOCALS~1\Temp\1'
TMP = `C:\DOCUME~1\ahain\LOCALS~1\Temp\1'
USERDOMAIN = `LIBRARY'
USERNAME = `ahain'
USERPROFILE = `C:\Documents and Settings\ahain'
windir = `C:\WIN-ES'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:\cygroot'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:\cygroot/bin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:\cygroot/lib'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal
Server\
Install\Software\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal
Server\
Install\Software\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal
Server\
Install\Software\Cygnus Solutions\Cygwin\mounts v2

a:  fd           N/A    N/A
c:  hd  NTFS   19461Mb  47% CP CS UN PA FC
d:  hd  NTFS   87926Mb  54% CP CS UN PA FC     Stripe Set
e:  cd           N/A    N/A
f:  cd  CDFS     587Mb 100%    CS              VSP600ENU1

C:\cygroot      /          system  binmode
C:\cygroot/bin  /usr/bin   system  binmode
C:\cygroot/lib  /usr/lib   system  binmode
.               /cygdrive  user    binmode,noumount

Found: c:\cygroot\bin\bash.exe
Found: c:\cygroot\bin\cat.exe
Found: c:\cygroot\bin\cpp.exe
Found: c:\cygroot\bin\find.exe
Found: c:\cygroot\bin\gcc.exe
Not Found: gdb
Found: c:\cygroot\bin\ld.exe
Found: c:\cygroot\bin\ls.exe
Found: c:\cygroot\bin\make.exe
Found: c:\cygroot\bin\sh.exe

  621k 2002/01/16 c:\cygroot\bin\cygcrypto.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypto.dll" v0.0 ts=2002/1/16 1:54
   45k 2001/04/25 c:\cygroot\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                  "cygform5.dll" v0.0 ts=2001/4/24 22:28
   35k 2002/01/09 c:\cygroot\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
                  "cygform6.dll" v0.0 ts=2002/1/8 22:03
   19k 2002/02/20 c:\cygroot\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2002/2/19 19:05
   17k 2001/06/28 c:\cygroot\bin\cyghistory4.dll - os=4.0 img=1.0
sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/6 20:34
   20k 2002/01/13 c:\cygroot\bin\cyghistory5.dll - os=4.0 img=1.0
sys=4.0
                  "cyghistory5.dll" v0.0 ts=2002/1/12 17:27
   22k 2001/12/13 c:\cygroot\bin\cygintl-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl-1.dll" v0.0 ts=2001/12/13 1:28
   21k 2001/06/20 c:\cygroot\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2001/6/20 10:09
   81k 2000/12/05 c:\cygroot\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2000/11/25 17:43
   35k 2000/12/05 c:\cygroot\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2000/11/25 17:43
   26k 2001/04/25 c:\cygroot\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu5.dll" v0.0 ts=2001/4/24 22:27
   20k 2002/01/09 c:\cygroot\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu6.dll" v0.0 ts=2002/1/8 22:03
  156k 2001/04/25 c:\cygroot\bin\cygncurses++5.dll - os=4.0 img=1.0
sys=4.0
                  "cygncurses++5.dll" v0.0 ts=2001/4/24 22:29
  175k 2002/01/09 c:\cygroot\bin\cygncurses++6.dll - os=4.0 img=1.0
sys=4.0
                  "cygncurses++6.dll" v0.0 ts=2002/1/8 22:03
  226k 2001/04/25 c:\cygroot\bin\cygncurses5.dll - os=4.0 img=1.0
sys=4.0
                  "cygncurses5.dll" v0.0 ts=2001/4/24 22:17
  202k 2002/01/09 c:\cygroot\bin\cygncurses6.dll - os=4.0 img=1.0
sys=4.0
                  "cygncurses6.dll" v0.0 ts=2002/1/8 22:03
   15k 2001/04/25 c:\cygroot\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel5.dll" v0.0 ts=2001/4/24 22:27
   12k 2002/01/09 c:\cygroot\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel6.dll" v0.0 ts=2002/1/8 22:03
   40k 2001/11/21 c:\cygroot\bin\cygpcre.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcre.dll" v0.0 ts=2001/11/21 14:15
   39k 2001/11/21 c:\cygroot\bin\cygpcreposix.dll - os=4.0 img=1.0
sys=4.0
                  "cygpcreposix.dll" v0.0 ts=2001/11/21 14:15
  108k 2001/06/28 c:\cygroot\bin\cygreadline4.dll - os=4.0 img=1.0
sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/6 20:34
  121k 2002/01/13 c:\cygroot\bin\cygreadline5.dll - os=4.0 img=1.0
sys=4.0
                  "cygreadline5.dll" v0.0 ts=2002/1/12 17:27
  156k 2002/01/16 c:\cygroot\bin\cygssl.dll - os=4.0 img=1.0 sys=4.0
                  "cygssl.dll" v0.0 ts=2002/1/16 1:54
  390k 2000/12/05 c:\cygroot\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2000/11/25 17:39
    5k 2000/12/05 c:\cygroot\bin\cygtclpip80.dll - os=4.0 img=1.0
sys=4.0
   10k 2000/12/05 c:\cygroot\bin\cygtclreg80.dll - os=4.0 img=1.0
sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2000/11/25 17:39
  623k 2000/12/05 c:\cygroot\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2000/11/25 17:43
   50k 2002/03/12 c:\cygroot\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2002/3/11 20:38
  751k 2002/05/16 c:\cygroot\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2002/2/25 8:14
    Cygwin DLL version info:
        DLL version: 1.3.10
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 51
        Shared data: 3
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix:
        Build date: Mon Feb 25 11:14:34 EST 2002
        Shared id: cygwin1S3

Cygwin Package Information
Last downloaded files to: D:\dist\cygwin
Last downloaded files from:
ftp://ftp.nas.nasa.gov/mirrors/cygwin.com/pub/cygwin

Package             Version
XFree86-base        4.2.0-1
XFree86-bin         4.2.0-1
XFree86-etc         4.2.0-1
XFree86-fenc        4.2.0-2
XFree86-fnts        4.2.0-2
XFree86-lib         4.2.0-3
XFree86-startup-scripts4.2.0-2
XFree86-xserv       4.2.0-2
ash                 20020131-1
bash                2.05a-3
binutils            20011002-1
cygrunsrv           0.95-1
cygutils            1.0.0-1
cygwin              1.3.10-1
cygwin-doc          1.0-1
diff                0.0
expect              20010117-1
fileutils           4.1-1
findutils           4.1
fvwm                2.4.7-2
gawk                3.0.4-1
gcc                 2.95.3-5
gdbm                1.8.0-4
gettext             0.10.40-1
grep                2.5-1
groff               1.17.2-1
gzip                1.3.2-1
less                374-1
libintl             0.10.38-3
libintl1            0.10.40-1
libncurses5         5.2-1
libncurses6         5.2-8
libreadline4        4.1-2
libreadline5        4.2a-1
login               1.4-3
make                3.79.1-5
man                 1.5g-2
mingw-runtime       1.3-2
more                2.11o-1
ncurses             5.2-8
openssh             3.1p1-1
openssl             0.9.6c-3
pcre                3.7-1
popt                1.6.2-1
readline            4.2a-1
sed                 3.02-1
sh-utils            2.0-2
tar                 1.13.19-1
tcltk               20001125-1
termcap             20020403-1
terminfo            5.2-2
textutils           2.0.21-1
w32api              1.3-2
which               1.5-1
zlib                1.1.4-1

Use -h to see help about each section

C:\>

> -----Original Message-----
> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Prentis Brooks
> Sent: Friday, May 17, 2002 11:02 AM
> To: Tony Hain
> Cc: Ulrich Voss; [email-masked]; [email-masked]
> Subject: RE: cygwin & opensshd on .net enterprise server
>
>
> That is what I was saying, there are cases where mkpasswd and
> mkgroup do
> not create clean files, primarily on Domain Controllers.  You need to
> verify them manually.
>
>
> On Fri, 17 May 2002, Tony Hain wrote:
>
> > Ulrich Voss wrote:
> > > I'll second everything Printis said and in addition
> please check, if
> > > you have the correct user-id in your passwd and group. On my
> > > W2K cygwin inserted (only) my local admin account to passwd,
> > > while I log in with my domain admin account. So id, ls -l etc. all
> > > look fine (admin admin), but nothing works, cause it is the false
> > > admin account (the false SID). OK, you mention, that you only
> > > have local users and no domain users, but make sure, that cygwin
> > > thinks the same ;-)
> >
> > I have deleted & regenerated both the passwd & group files
> a couple of
> > times while playing around with various edits. It is easy to
> > misconfigure them so that logging in via ssh fails, but
> when they are
> > fresh generated via mkpasswd & mkgroup the ssh login succeeds as
> > recorded in the event log, then the connection is
> immediately dropped. I
> > assume that is because bash or sh also immediately exit
> when run from a
> > command line under that user. When I run id under anything
> except the
> > system account it hangs at 100% cpu. It also makes no
> difference when I
> > set the account policies for the user to 'act as system',
> 'adjust memory
> > quotoas', & 'replace process token'.
> >
> > I didn't have any problems at all with the W2k install. This all
> > happened when I moved to .net server. So far I haven't seen anyone
> > acknowledge that they have cygwin working under .net
> server, so I don't
> > know if the problem is local to my system, or something that MS has
> > changed in account handling due to their recent 'focus on security'.
> >
> > I did receive a suggestion to run strace, and I have the
> output of that
> > for anyone that would care to look at it. (It doesn't seem
> like a good
> > idea to send that to an open list in general, and it is also fairly
> > long.) Short version below:
> >
> > Tony
> >
> >
> > C:\cygroot\bin>strace bash --login -i
> > **********************************************
> > Program name: C:\cygroot\bin\bash.exe (3776)
> > App version:  1003.9, api: 0.51
> > DLL version:  1003.10, api: 0.51
> > DLL build:    2002-02-25 11:14
> > OS version:   Windows NT-5.1
> > Date/Time:    2002-05-17 10:30:09
> > **********************************************
> >  1994    3642 [main] bash 3776 environ_init: 0xA010420:
> > !C:=C:\cygroot\bin
> > ...
> > ...
> > ...
> > 10233 1949651 [main] bash 3776
> fhandler_console::output_tcsetattr: 0 =
> > tcsetattr
> >  (,C50018) (ENABLE FLAGS 3) (lflag 107 oflag 9)
> >  9971 1959622 [main] bash 3776
> dtable::init_std_file_from_handle: fd 2,
> > handle 0
> > xB
> >  9747 1969369 [main] bash 3776 dll_list::init: here
> >  5115 1974484 [main] bash 3776 dll_crt0_1: user_data->main 0x401208
> >
> > C:\cygroot\bin>
> >
>
> --
> Prentis Brooks	| [email-masked] | 703-265-0914 | AIM:
> PrentisBrooks
> Senior System Administrator - Web Infrastructure & Security
>
>        A knight is sworn to valor.  His heart knows only
> virtue.  His blade
>        defends the helpless.  His word speaks only truth.
> His wrath undoes
>        the wicked. - the old code of Bowen, last of the dragonslayers
>
>

--
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/