From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id DD9983858295; Mon, 4 Mar 2024 10:26:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD9983858295 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1709547974; bh=twcPHXQTOdFpIIZehLE1ztAiPqKiPGeJHFlMhvN44Es=; h=Date:From:To:Subject:Reply-To:References:In-Reply-To:From; b=QDG+EmbOp8fMVMd+BkXgXeW0WjnFPvg3ZNsyq1ymyx6OozidDCvLC4U2plkzCGz9z 5A5Mliyn510/XjClFFbgLH2Z1EEC71UyjHxcog5KBfvQZdHOt1llOmuSkKB96Pf2da DO3JKihvSE6vIL52oA9VOFWJTHp6r9dTUohlaDtk= Received: by calimero.vinschen.de (Postfix, from userid 500) id E86FDA8063B; Mon, 4 Mar 2024 11:26:12 +0100 (CET) Date: Mon, 4 Mar 2024 11:26:12 +0100 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: UNIX nobody/nogroup mapping to which Windows SID/account? Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: On Mar 3 14:45, Martin Wege via Cygwin wrote: > Hello, > > How can we map UNIX "nobody"/"nogroup" to Win32 SIDs/accounts? Cygwin > has entries for "nobody" in /etc/passwd and "nogroup" in /etc/group, > but these accounts have SIDs returned by /usr/bin/getent passwd and > /usr/bin/getent group which LookupAccountSidA() does not recognise. > > So what is the correct Win32 solution? I urge you to read the entire thread starting at https://sourceware.org/legacy-ml/cygwin/2016-06/msg00347.html There's a *LOT* of information in there in terms of discussing and creating the nobody/nogroup mapping. Bottom line is, there's no nobody account equivalent on Windows and no resolvable SID/Name pair. Thus, we decided to use the SID S-1-0-65534 mapped to uid/gid 65534 for this purpose. This doesn't matter to native Windows, it's just some foreign SID. But it's resolvable inside Cygwin: $ getent passwd S-1-0-65534 no+body:*:65534:65534:U-no\body,S-1-0-65534:/:/sbin/nologin $ getent group S-1-0-65534 no+body:S-1-0-65534:65534: Corinna