From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout.easymail.ca (mailout.easymail.ca [64.68.200.34]) by sourceware.org (Postfix) with ESMTPS id B1F34385AC12 for ; Thu, 13 Jan 2022 22:40:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B1F34385AC12 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=house.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=house.org Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 0FC688075A for ; Thu, 13 Jan 2022 22:40:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo03-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo03-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cTaBukL7HUh5 for ; Thu, 13 Jan 2022 22:39:59 +0000 (UTC) Received: from tringa.house.org (S0106244bfe767d79.gv.shawcable.net [24.108.58.76]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 847CF806D0 for ; Thu, 13 Jan 2022 22:39:59 +0000 (UTC) From: Chris Roehrig Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Help with standalone samba SID-uid mapping Message-Id: <064846E1-8D6D-41D2-97D9-4C3793502CEE@house.org> Date: Thu, 13 Jan 2022 14:39:58 -0800 To: cygwin@cygwin.com Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2022 22:40:03 -0000 I'm trying to set up samba (standalone) following these instructions: https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-samba but I'm having no luck getting my samba user/groups to appear correctly = using the comment field as described in the = document. I'm using samba 4.13.14 on Ubuntu 20.04 with security =3D user = (smbpasswd). winbindd is not installed and I'm not using any LDAP or = AD anywhere. E.g. here is what is on the server (croehrig:croehrig =3D 601:601; = cristina:cristina =3D 603:603) housesrv[3]% ls -l /House/Users total 17 drwxr-xr-x 9 cristina cristina 22 Jan 12 16:06 cristina drwxr-xr-x 30 croehrig croehrig 53 Jan 13 09:47 croehrig Here are the ACLs and SIDs when looking on the windows client: tyto[5]% icacls \\\\housesrv\\Users\\\* \\housesrv\Users\cristina = S-1-5-21-751087815-2087572193-42305691-1001:(F) S-1-22-2-603:(RX) Everyone:(RX) \\housesrv\Users\croehrig = S-1-5-21-751087815-2087572193-42305691-1000:(F) S-1-22-2-601:(RX) Everyone:(RX) As you can see, the gid is mapping to the S-1-22-2- as described in = the document above, but the uid is using a domain-specific SID with different RIDs.=20 On the windows client I have the same users and groups set up locally = (SAM) with appropriate SID mappings to the same uid/gids (601/603) in = the Cygwin /etc/passwd and /etc/group. This has all been working = well to ensure e.g. rsync preserves permissions and ownership between = cygwin and Linux. (The windows groups are called 'grp-croehrig' and = 'grp-cristina' since windows users and groups share a namespace, but = they are mapped to 'croehrig' and 'cristina' in /etc/group). Here is how the SMB share looks under Cygwin: tyto[6]% ls -l //housesrv/Users/ total 0 drwxr-xr-x 1 Unknown+User Unix_Group+603 0 Jan 12 16:06 cristina drwxr-xr-x 1 Unknown+User Unix_Group+601 0 Jan 13 09:47 croehrig tyto[7]% ls -ln //housesrv/Users/ total 0 drwxr-xr-x 1 4294967295 4278190683 0 Jan 12 16:06 cristina drwxr-xr-x 1 4294967295 4278190681 0 Jan 13 09:47 croehrig I have added the SAM desc/comment field as described in the document = above: i.e. net localgroup grp-croehrig /comment:'' net user croehrig /comment:'' and restarted all Cygwin processes, but it doesn't seem to have any = effect ('net user croehrig' shows the comment is indeed present). I = guess I don't understand how that comment field works. Anyone have any advice?=20 Thanks, -- Chris