This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Accessing SMB share as wrong user?
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: David Dyer-Bennet <dd-b at dd-b dot net>, cygwin at cygwin dot com
- Date: Mon, 29 May 2017 22:53:46 +0300
- Subject: Re: Accessing SMB share as wrong user?
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtp1h.mail.yandex.net; dkim=pass header.i=@yandex.ru
- References: <7f4eb950-de06-2981-c9b4-fd345c11ffb3@dd-b.net>
- Reply-to: cygwin at cygwin dot com
Greetings, David Dyer-Bennet!
> All my files are on drive P: in Windows, which is an SMB share
> equivalent to \\fsfs\ddb\Documents. Everything works fine in windows
> apps, and I see what I expect in Explorer, including when I go down to
> security properties and look in detail.
> However, Cygwin has trouble with this lately (I can't trace exactly when
> it started happening; not weeks, maybe a year, but I've been running
> essentially this way since 2006 and most of the time things were fine).
> Cygwin appears to be accessing the share as some kind of unknown user,
> rather than as the proper user configured in Windows for that share
> (which is FSFS\ddb).
> In Cygwin "id" shows
> $ id
> uid=197608(David Dyer-Bennet) gid=197121(None)
> groups=197121(None),
> 114(Local account and member of Administrators group),
> 544(Administrators),
You're running Cygwin with elevated privileges.
> 545(Users),4(INTERACTIVE),66049(CONSOLE
> LOGON),11(Authenticated Users),15(This Organization),113(Local
> account),66048(LOCAL),262154(NTLM Authentication),405504(High Mandatory
> Level)
> but if I create a file it gets created owned by "Unknown+User":
> $ touch foobar
> David Dyer-Bennet@DDB4 /cygdrive/p
> $ ls -l foobar
> ----r--r-- 1 Unknown+User Unix_Group+1001 0 May 28 17:27 foobar
> David Dyer-Bennet@DDB4 /cygdrive/p
> $ getfacl foobar
> # file: foobar
> # owner: Unknown+User
> # group: Unix_Group+1001
Your share is located on Samba server.
> user::---
> group::r--
> other:r--
> And then of course I can't access it:
> $ echo things >> foobar
> -bash: foobar: Permission denied
See Cygwin manual about setting up your network identity.
Read around nsswitch.conf and implications of its different settings.
> I haven't that I've noticed done anything to change what user I run as;
> $USER is "David Dyer-Bennet" (the Windows username I'm in under), and
> /etc/passwd has default output from mkpasswd,
Ditch /etc/passwd unless you absolutely require it.
> including the user "David
> Dyer-Bennet" with the UID 197608 (same is ID shows at the command line).
> At least I can count on people here not answering "just ditch
> Cygwin"...right?
And please leave ramblings outside the list. This was absolutely uncalled for.
--
With best regards,
Andrey Repin
Monday, May 29, 2017 22:49:56
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple