How to properly set up /etc/passwd and /etc/group

Larry Hall (Cygwin) reply-to-list-only-lh@cygwin.com
Mon Mar 1 05:12:00 GMT 2010


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



More information about the Cygwin mailing list