delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/06/21/03:51:47

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 21 Jun 2010 09:51:33 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygwin 1.7.5, 'id -ng' fails when /etc/group is a symlink
Message-ID: <20100621075133.GA613@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4C1EBFC5 DOT 7020307 AT comcast DOT net>
MIME-Version: 1.0
In-Reply-To: <4C1EBFC5.7020307@comcast.net>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Jun 20 21:26, kstmp001 AT comcast DOT net wrote:
> When /etc/group is a symlink to a valid and correctly formatted file
> containing the group information elsewhere on the system (e.g.,
> /etc/group -> /etc/_group), 'id -ng' will always return 'mkgroup' as
> the users group.
> 
> However, if I remove the /etc/group symlink and rename /etc/_group
> to /etc/group, then 'id -ng' returns the correct user group
> information ('None' in this case).

Does the User's Guide help?
http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-etc

> Also, for reference, I have been successfully using a symlink for
> the /etc/group and /etc/passwd files for years in Cygwin 1.5x
> without issue and I would like to continue doing so in 1.7x.

That won't be possible using Cygwin symlinks.  If you're running
Vista or later, you can try to make /etc/group a native NTFS symlink.
In your above example, for instance, in an elevated(!) shell:

  bash$ cd /etc && cmd /c "mklink group _group


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019