delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/01/00:12:32

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=2.4 required=5.0 tests=AWL,BAYES_00,BOTNET
X-Spam-Check-By: sourceware.org
Message-id: <4B8B4CA1.7020002@cygwin.com>
Date: Mon, 01 Mar 2010 00:12:01 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-to: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Remi/2.0.0.21-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0
MIME-version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: How to properly set up /etc/passwd and /etc/group
References: <4B8B4B2E DOT 1040506 AT wesbarris DOT com>
In-reply-to: <4B8B4B2E.1040506@wesbarris.com>
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

On 03/01/2010 12:05 AM, Wes Barris wrote:
> I have installed cygwin on many systems.  One thing that has always
> bugged me is that I have to muck around with the uid and gid in the
> /etc/passwd and /etc/group files in order to get things working.
> The mkpasswd and mkgroup commands don't seem to produce files that
> work. I'm sure that I'm missing some fundamental knowledge about
> this but I don't know what. I've read the mkpasswd man page, the
> FAQ and searched for posts but have found nothing that helps me.
>
> Here is a simple case. My home computer runs XP. I want my /cygwin
> home directory to be the W drive (/cygdrive/w). After installing
> cygwin and changing the home path in the /etc/passwd file to /cygdrive/w,
> a long listing of my home directory shows a bunch of '?' question marks
> as the owner and group fields like this:
>
> drwxrwxrwt+ 1 ???????? ???????? 0 2010-01-10 17:13 Projects
>
> What I normally end up doing is to list the directory with the '-n'
> option that shows me the uid and gid information (in this case
> both are 4294967295. I manually edit the /etc/passwd and /etc/group
> files accordingly so that my directory listing looks like this:
>
> drwxrwxrwt+ 1 wes admin 0 2010-01-10 17:13 Projects
>
> What is the correct procedure for getting this set up correctly?

It's not really clear from the above because it's not clear whether
you're in a domain or not.  My guess is you are (since the above
has some hints suggesting that).  If so, use the '-l -d' flags for
'mkpasswd' and 'mkgroup'.  That will get your domain as well
as your local users/groups in those files.  If that's overwhelming,
check out the '-c' flag.  These are all described in the man page
and/or Users Guide if you need more info.

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

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