X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=pGbz21luSEoT/CrAHFqECulPKxi8sIl02uQR1ZxIM06ENt7aw1uGZ
	WzipzkMdJVVv1UTTCSLx4W3KCar3qiwsxIO9akr94se8fi2R35ySEYkRpgBsyTZ6
	b94ONaySQZgHJ5nVo35Y+4gDpz165Pt5XY8iVQTF7KaHVlgQxgpdjQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=bfDjsKMFysyIqtmSMpSvvCFE+dg=; b=I/VlDGtVnIF2igWZ67+AW0dddK/h
	ZuYDBQQG12gmQ1NI46s5os2rX01U6GJGe0G/vnCWLoLixxR+N+nuAzipohXRwUQ5
	NqwhsPtJGVwqTf2WU2lT2oGKqeOuLHj3hJrVdpNQRsba03ixFGVLuO3hE/0/gzwG
	tKnEvmjgYAAftmU=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-93.9 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=vault, 42223, ls, samba
X-HELO: calimero.vinschen.de
Date: Thu, 18 Feb 2016 11:31:14 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Unknown+User and Unknown+Group when using ls via ssh
Message-ID: <20160218103114.GA8575@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <14C42154-42E2-4C1A-86DA-B39CA5205F01@momento.com.au>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;	protocol="application/pgp-signature"; boundary="J2SCkAp4GZ/dPZZf"
Content-Disposition: inline
In-Reply-To: <14C42154-42E2-4C1A-86DA-B39CA5205F01@momento.com.au>
User-Agent: Mutt/1.5.24 (2015-08-30)

--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Feb 18 17:17, James Whitwell wrote:
> Hi,
>=20
> We=E2=80=99re having some trouble when logged in via ssh that we don=E2=
=80=99t have
> when we log in directly (in our case RDP to the server, then start
> bash from the Windows desktop).  Our environment is Windows Server
> 2008 R2 64-bit joined to a Samba domain, running Cygwin 2.4.1 64-bit.
>=20
> The problem we=E2=80=99re having seems to be with usernames and groups.  =
When
> we=E2=80=99re logged in directly, it works perfectly e.g.
>=20
> WORKFLOW3:jams:~:$ cd /cygdrive/e
> WORKFLOW3:jams:/cygdrive/e:$ ls -l
> total 12
> dr-xr-x---+ 1 jams         Domain Users  0 Feb 18 10:36 $RECYCLE.BIN/
> drwxrwx---+ 1 wfcron       Domain Users  0 Sep 23 14:13 PDF/
> drwxr-x---  1 Unknown+User Unknown+Group 0 Mar  7  2015 System Volume Inf=
ormation/
> drwxrwx---+ 1 wfcron       Domain Users  0 Sep  7 10:30 Vault/
> WORKFLOW3:jams:/cygdrive/e:$ cd PDF
> WORKFLOW3:jams:/cygdrive/e/PDF:$ ls -l
> total 29696
> -rwxrwx---+ 1 wfcron Domain Users 0 Feb 18 17:09 from-cron*
> drwxrwx---+ 1 wfcron Domain Users 0 Feb 18 11:15 pdf/
> WORKFLOW3:jams:/cygdrive/e/PDF:$
>=20
> But when I ssh to the machine and try the same commands, I get
> =E2=80=9CUnknown+User=E2=80=9D and =E2=80=9CUnknown+Group=E2=80=9D from =
=E2=80=9Cls=E2=80=9D, and can=E2=80=99t =E2=80=9Ccd PDF=E2=80=9D e.g.
>=20
> WORKFLOW3:jams:~:$ cd /cygdrive/e
> WORKFLOW3:jams:/cygdrive/e:$ ls -l
> total 4
> dr-xr-x---+ 1 jams         Domain Users  0 Feb 18 10:36 $RECYCLE.BIN/
> drwxr-x---  1 Unknown+User Unknown+Group 0 Sep 23 14:13 PDF/
> drwxr-x---  1 Unknown+User Unknown+Group 0 Mar  7  2015 System Volume Inf=
ormation/
> drwxr-x---  1 Unknown+User Unknown+Group 0 Sep  7 10:30 Vault/
> WORKFLOW3:jams:/cygdrive/e:$ cd PDF
> -bash: cd: PDF: Permission denied
> WORKFLOW3:jams:/cygdrive/e:$
>=20
> I=E2=80=99ve tried strace on the ls via ssh (attached) but can=E2=80=99t =
see anything
> obvious failing in it.

I tried this myself and can't reproduce it in my (granted: very tiny)
AD environment.  But there's an obvious problem in the strace:

  13138   42223 [ldap_init] ls 6764 cyg_ldap::connect_non_ssl: ldap_bind((n=
ull)) 0x51

So ldap_bind returns with error code 0x51 which is LDAP_SERVER_DOWN.
Assuming the server is not really down, the error code means the caller
cannot connect to the LDAP server for one reason or the other.  This
reason is not visible from the strace and it might be necessary to hunt
this down locally.  Note that error 0x51 really means contacting the
server fails.  It's not an authentication problem or something like that.


HTH,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--J2SCkAp4GZ/dPZZf
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWxZ1yAAoJEPU2Bp2uRE+gvZIQAJ38HjkMZVt65tTg1WiaQmmg
FqOOMpPVuX38SF1Qx2jxzeH/EkirtJesf6pPTlD/ontoSS/sLZsnWiRdApdh8l4c
mFaQUmAEioUT2PAhq6GIBPOVVdDWdWE83hLx4Shumfo/FogMmdSIWyJQM+IwVfDh
HKCZ/EG+irC9nHlsCNFKJG3/qHDql2j1o5KM1CH4CXQL4IRB/G/RT+immOTMf89I
+jZcBUcPNz0naIkMPcrae9zQBKZDm2mtkzIJk1yCio8HqlSFOz5Jd8xd0c7Vrbee
62nZPiMuVKI2gyl9cnvmxfQEwLVx6mP914tuu2hoY5/hl8OPsJQF8vaZnOj8BE+u
yfKnTCyIW1vctmkIjcgUGaf2LJYgsy7UzedighApASQC9tyWQYFEBCQjoCEZlkkA
Ujhc8d3LOGBArkqyNas7PJHdDPvMw9qa+gx1jstBcDJWjRHj1pQQ3zqikle6MfTE
XITfp5H8Iut1vuX6fXOxMsFSc2a1ejNH6/G1mK/uTOvnkuMp4YoT2w1x2AUiWpnl
wD3nZyEXgkKy1fxUGXIosF6ickvfE8RvGbaOaiY8ENSbsskgp04bwpCwMucIQFJ/
rdDc2ZotZK/6KCMoAT19egVEFGQdYWfclmBYBgvUK1N3eIWdMHJRDpiKVc2WFYjA
mLOkkkj/ddShwYj4gkZE
=g+gQ
-----END PGP SIGNATURE-----

--J2SCkAp4GZ/dPZZf--
