public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: rename a user using setfacl -- possible? how?
Date: Sat, 06 Jul 2019 17:01:00 -0000	[thread overview]
Message-ID: <2ac2d302-559c-b6ba-c7e2-5ec12e1683de@SystematicSw.ab.ca> (raw)
In-Reply-To: <69388071.20190706190156@yandex.ru>

On 2019-07-06 10:01, Andrey Repin wrote:
>> On 2019/07/06 02:06, Andrey Repin wrote:
>>>> I guess I don't know how to modify an entry to either 1-rename it, or
>>>> 2 add the new entry.
>>> You don't.
>>> If you want to change name for display purposes, look into nsswitch.conf and
>>> associated documentation.
>>         My machine's GUID changed.  This file has entry for userX
>> on the old machine-GUID.  UserX also exists on the new machine GUID.
>> So I renamed the old entry to UserXold so I could find all the places
>> where the old GUID is referenced then change it to the machine's new guid.
>> I'm not having cygwin create new groups or whatever, but trying to replace
>> references to this Userid in the machine's old GUID and replace them with
>> reference to the Uid with the machine's new GUID.
>> if it was the main group, I'd just use find to locate instances of old
>> and do chgrp to change ownership to new.  However, this is a group entry
>> in an acl list -- so I need to change the name of 1 entry in the acl list.
>>> It should, but I strongly suggest to avoid using it outside Cygwin directory
>>> tree to maintain maximum interoperability with Windows programs.
>>         No problem.  my cygwin directory is at 'C:\', where it
>> has been since WinXP...  (:^|)
> THAT is a problem. A big problem.
>>> getent passwd
>>> getent group
>>         those don't display GUID/UUIDs, but *nix user+group ids.
> Try it sometime. They do.

Try:

$ id user|group

and see below for getent nsswitch changes suggested.

>> I wanted to see the windows guid associated with an identity.
>> Since the one I was looking for was a well-known-id I found it, but
>> in non-well-known cases,...?  
> Set nsswitch.conf to:
> passwd: db
> group: db
> db_enum: all
> then check `getent passwd`

In your work environment, you might want to try:

# passwd:	files db
# group:	files db
db_enum:	cache files local builtin primary alltrusted

See docs in - paste into browser:
/usr/share/doc/cygwin-doc/html/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch
or
$ cygstart https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch

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

  reply	other threads:[~2019-07-06 17:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05 19:14 L A Walsh
2019-07-06  4:45 ` Brian Inglis
2019-07-06  9:20 ` Andrey Repin
2019-07-06  9:39   ` L A Walsh
2019-07-06 10:41     ` Sam Edge
2019-07-06 16:05     ` Andrey Repin
2019-07-06 17:01       ` Brian Inglis [this message]
2019-07-17  1:52         ` L A Walsh
2019-07-17  9:05           ` Andrey Repin
2019-07-06 19:41 ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ac2d302-559c-b6ba-c7e2-5ec12e1683de@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).