X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=2.9 required=5.0 tests=AWL,BAYES_50,DKIM_ADSP_CUSTOM_MED,FORGED_YAHOO_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RP_MATCHES_RCVD,TW_MK,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Message-ID: <32576391.post@talk.nabble.com> Date: Sat, 1 Oct 2011 19:36:49 -0700 (PDT) From: gsingh93 To: cygwin AT cygwin DOT com Subject: Re: Different commands give different groups In-Reply-To: <4E871BAF.3040106@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <32572751 DOT post AT talk DOT nabble DOT com> <4E871BAF DOT 3040106 AT redhat DOT com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com That makes sense, but I've completely restarted my computer and yet it still shows the old groups. So a new process that uses the new groups hasn't started. Any idea why? eblake wrote: > > On 09/30/2011 09:49 PM, gsingh93 wrote: >> >> Why do these two commands give different groups? It's the same user. > > Because the effective gid set for the existing process differs from the > recorded groups in /etc/groups - most likely, you've changed /etc/groups > but haven't logged out and back in to start a new process hierarchy that > uses the new groups. > >> >> Gulshan AT GSJK-PC /etc >> $ id Gulshan >> uid=1000(Gulshan) gid=545(Users) groups=545(Users),0(root) > > That's what the groups will be if a new process is started for Gulshan. > >> >> Gulshan AT GSJK-PC /etc >> $ id >> uid=1000(Gulshan) gid=545(Users) groups=545(Users),513(None) > > Whereas that's what the groups are now for the current process. > > This aspect of your situation is not cygwin-specific, the same behavior > can be observed in other OSs when you change the user database after a > particular user already has a process started. > >> >> Furthermore, the commands mkgroup and mkpasswd give the orginial states >> of >> their corresponding files instead of what I changed them to. Why is that? > > This part is cygwin-specific - and the answer is that mkgroup and > mkpasswd are querying Window's database of user information, not /etc > (so that you can then populate /etc with information that matches the > Window's database). Windows doesn't care what you put in /etc, so the > amount of changes you can make in those files that still have a > worthwhile visible effect to cygwin processes is a bit limited. > > -- > Eric Blake eblake AT redhat DOT com +1-801-349-2682 > Libvirt virtualization library http://libvirt.org > > -- > 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 > > > -- View this message in context: http://old.nabble.com/Different-commands-give-different-groups-tp32572751p32576391.html Sent from the Cygwin list mailing list archive at Nabble.com. -- 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