From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115418 invoked by alias); 6 Jul 2019 17:01:46 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 115405 invoked by uid 89); 6 Jul 2019 17:01:46 -0000 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= X-HELO: smtp-out-so.shaw.ca Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.139) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 06 Jul 2019 17:01:44 +0000 Received: from [192.168.1.114] ([24.64.172.44]) by shaw.ca with ESMTP id jo4DhAeMTIhW9jo4Eh0fNh; Sat, 06 Jul 2019 11:01:43 -0600 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> <113642000.20190706120641@yandex.ru> <5D206C63.4000908@tlinx.org> <69388071.20190706190156@yandex.ru> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <2ac2d302-559c-b6ba-c7e2-5ec12e1683de@SystematicSw.ab.ca> Date: Sat, 06 Jul 2019 17:01:00 -0000 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: <69388071.20190706190156@yandex.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg00048.txt.bz2 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