Mail Archives: cygwin/2010/06/22/23:57:09
| X-Recipient:  | archive-cygwin AT delorie DOT com
 | 
| X-SWARE-Spam-Status:  | No, hits=2.2 required=5.0	tests=AWL,BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_MK,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
 | 
| X-Spam-Check-By:  | sourceware.org
 | 
| Message-ID:  | <4C21861E.5040201@comcast.net>
 | 
| Date:  | Tue, 22 Jun 2010 23:57:18 -0400
 | 
| From:  | Ken <kstmp001 AT comcast DOT net>
 | 
| User-Agent:  | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 SeaMonkey/2.0.3; Firefox/3.6.0
 | 
| MIME-Version:  | 1.0
 | 
| To:  | cygwin AT cygwin DOT com
 | 
| Subject:  | Re: cygwin 1.7.5, 'id -ng' fails when /etc/group is a symlink
 | 
| Mailing-List:  | contact cygwin-help AT cygwin DOT com; run by ezmlm
 | 
| List-Id:  | <cygwin.cygwin.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
 | 
 >> >> 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
 >>
 >> Now that I have "read" the documentation, I understand.  And, yes,
 >> the native NTFS symlink method does indeed work in Windows 7.
 >> Unfortunately, that will not help in my WinXP environments.  However,
 >> native Windows shortcuts (.lnk files) will work for my purposes in
 >> both OSes.  And, since the documentation for the special files in /etc
 >> states that "These file are read using native Windows NT functions",
 >> I presume that method would be acceptable in this case - I realize
 >> that this is somewhat unorthodox, however.
 >
 >Hang on, are you saying that .lnk shortcuts really work for you in this
 >specific case?  Did you try it?
 >
 >Otherwise, I doubt that they work.  Shortcuts are an invention for the
 >GUI, and they are evaluated by the user32 higher level lib.  They have
 >no meaning in the native NT API.
Well, I am embarrassed to say I thought I did ... upon a closer look
I found that, with all the testing I was performing, I had neglected to
comment out a section of my startup script which executes mkgroup to
populate /etc/group if it does not exist (which it did not since I had
renamed it to _group - and was the target of group.lnk).  This resulted
in the creation of /etc/group itself and subsequently 'id -ng' returning the
expected group ('None', rather than 'mkgroup' as before) which led
me to believe it worked.  Oops!
I have taken care of that oversight now.
So, you are correct, it did not actually work before.  Thank you for
the warranted skepticism.
BTW, this is the same script that I use for Cygwin 1.5x in conjunction with
a symlink (created with 'ln -s') for /etc/group -> 
/cygdrive/z/cygwin/etc/group
(a common group file located on a drive mapped (z) to a CIFS share
on a Server.  I also use a symlink for /etc/passwd in the same manner.
This method has worked fine for 5+ years without fail in 1.5x as long as the
symlink attribute is set to R/O (which is the default result from 'ln -s').
 >If you're looking for a workaround in the XP environment, I'd suggest to
 >create a directory junction for the /etc directory and let all XP
 >machines have the same /etc.
I was of the understanding that junctions were not supported over a CIFS
share (my ultimate target; as with 1.5x).  Perhaps you have information to
the contrary?
Since I have to manage the Win XP side for the foreseeable future, it
appears that I will have to adopt another methodology to centrally manage
these files due to the new 1.7x symlink implementation.
That said, I still think Cygwin is GREAT!
Thank you again,
Ken
--
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 -