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:reply-to:subject:to:references:from:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=CxCcnEn9fqE1iBO9
	BOKGzTGQj7iD5/gLkm5iTGEdrfemIBC0q7ikCVM/VNimdaGXytPamnj3zdYYcY5Q
	cuoVAkvm3LpmqQDBvnFJfJVcowPy20VsWg3c+p/+15RjbDl0ucaBxq9uk8hxgLoe
	Sm3UOj1pX4ZO1CIOkzRnwfqDQh4=
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:reply-to:subject:to:references:from:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=YOim8yUrIH1b1kdWts4wRO
	XJjXE=; b=K8oM36/BMIevWxG5V+Jgp/PQaOa9GTAaaLUMWipnwuvdhDqX26X421
	uIv1ooT7kJrEIy3cw69gZ18iuZo1nMe1Vap2pJwGa7RCVi1kVp3NhMm78g0IzWcC
	NuSeuUTvF5XjbwWW/JpPm14+QGICIyWR9PNlR3VjAqIVs8z+57wZ8=
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-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=Walsh, walsh, sid
X-HELO: smtp-out-so.shaw.ca
Reply-To: Brian.Inglis@SystematicSw.ab.ca
Subject: Re: rename a user using setfacl -- possible? how?
To: cygwin@cygwin.com
References: <5D1FA19D.2020707@tlinx.org>
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
Openpgp: preference=signencrypt
Message-ID: <7724989d-16d5-71ef-357f-c668db86de64@SystematicSw.ab.ca>
Date: Fri, 5 Jul 2019 22:45:44 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2
MIME-Version: 1.0
In-Reply-To: <5D1FA19D.2020707@tlinx.org>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

On 2019-07-05 13:14, L A Walsh wrote:
> Have an acl on a file 'testfile' that appears to include a userid
> with a GUID corresponding to some older value for the local system.
> I'm gave the old guid a name in /etc/group different from its name,
> say calling it 'oldname' (where current name, is say, 'curname').
> I guess I don't know how to modify an entry to either 1-rename it, or
> 2 add the new entry.
> I tried
> setfacl -x group:oldname:rwx -m group:curname:rwx but got:
> setfacl: illegal acl entries
> will setfacl not work for this task?

Utilities like setfacl work with Windows ACLs, users, and groups defined and
displayed using net user|localgroup|group. You can't rename Windows users or
groups but you can add (or delete) them using the net commands and other
equivalent methods, and Windows will assign GUIDs, and Cygwin will show its
encoded RID/SID:
	/usr/share/doc/cygwin-doc/html/cygwin-ug-net/ntsec.html
	https://cygwin.com/cygwin-ug-net/ntsec.html

> How do you add a new user to the access list -- obviously -x removes
> a user, but not sure if 'add' is covered by -m or whether or not you 'add'
> by specifying the new entry.

Use -m to add or changes entries in [D]ACLs.

> BTW -- is there an easy way to see the numeric values it is using
> for a given name?
> Like:
> group:Local account and member of Administrators group:rwx
> I remember seeing that, but it isn't in my /etc/group file.
> Tried getfacl with -n but that doesn't seem to be an option
> to display a numeric GUID.

If they are Windows users or groups which can be displayed using net commands,
then you can use:
$ id [USER|GROUP]
e.g.
$ id Administrator
uid=197108(Administrator) gid=197121(None) groups=197121(None)
$ id Administrators
uid=544(Administrators) gid=544(Administrators) groups=544(Administrators)

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

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

