X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <49E807A2.1060704@cwilson.fastmail.fm> Date: Fri, 17 Apr 2009 00:37:54 -0400 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: fstab.d/username References: <1239915391 DOT 5025 DOT 18 DOT camel AT station-1 DOT ad DOT isillc DOT com> In-Reply-To: <1239915391.5025.18.camel@station-1.ad.isillc.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Jerome Haltom wrote: > Using the textual user name is very bad form on Windows, as it is > subject to change. The settings *should* be stored in the registry or > the user's AppData\Local directories. These are mapped properly even > when the user's name changes. You can also use the user's SID rather than name (and the SID doesn't change). Furthermore, the "username" in /etc/fstab.d/username is NOT, necessarily, the *Windows* username. It's the *cygwin* username mapped to the user's SID via /etc/passwd: cygwin_username:unused:1000:513:Long Descriptive Name,U-MACHINE\Win32 User Name With Spaces,S-1-5-21-NNNNNNNNNN-NNNNNNNNNN-NNNNNNNNNN-1000:/home/cygwin_username:/bin/bash So, this account's SID is S-1-5-21-NNNNNNNNNN-NNNNNNNNNN-NNNNNNNNNN-1000 The Win32 username is "Win32 User Name With Spaces" (on machine "MACHINE"). You can change that username to whatever you want, but the SID will remain constant. ('Course, each time you do that, you'll need to regenerate your /etc/passwd). The cygwin username is 'cygwin_username' -- and the user mount file is /etc/fstab.d/cygwin_username However -- I don't think you'll see much concern over supporting "renaming" user accounts. Technically the username is, as you say, subject to change. That doesn't mean it's a good idea, or that it happens anywhere CLOSE to often. -- Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/