delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/07/21/04:37:49

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 21 Jul 2009 10:37:20 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [1.7] login ignores /etc/passwd in first invokation
Message-ID: <20090721083720.GX27613@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <h42p23$gcq$1 AT ger DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <h42p23$gcq$1@ger.gmane.org>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 Jul 20 23:54, Wolfgang Goetz wrote:
> Hi,
> 
> first shell: wrong ids, wrong homedirectory
> all other shells (don't close the first): all OK.

I can't reproduce this problem.

> steps to reproduce for 1.7:
> 
> 1) have valid /etc/passwd for a non-standard homedirectory
> using mkgroup/mkpasswd -l -d ...
> 
> wg:unused:129529:10513:Goetz
> Wolfgang,U-EMEA\wg,S-1-5-21-2053067395-845162621-1245804459-119529:/cygdrive/d/home/wg:/bin/bash

Per your cygcheck output the USERDOMAIN is AD1, but the passwd
entry shows U-EMEA\wg.  How does that happen?

> 2) no cygwin processes running.
> 
> 3) start a shell.
> 
> (profiles's mkpasswd-warning appears)
> 
> uid=400(wg) gid=401(mkpasswd) Gruppen=544(Administrators),547(Power
> Users),545(Users),204562(groupa),401(mkpasswd)

Are you sure /etc/passwd is really correct?

> but cygcheck -srv is reporting the correct ids.
> 
> /etc/passwd (new homedirectory) is ignored
> HOSTNAME missing.

What do you mean by "HOSTNAME missing"?  The environment variable?

> here the diff valid for all further shells:
> 
> diff cygcheck-17-first-srv.log cygcheck-17-srv.log
> 3c3
> < Current System Time: Mon Jul 20 16:54:24 2009
> ---
> > Current System Time: Mon Jul 20 16:54:47 2009
> 38,39c38,39
> < PWD = '/home/wg'
> < HOME = '/home/wg'
> ---
> > PWD = '/cygdrive/d/home/wg'
> > HOME = '/cygdrive/d/home/wg'
> 43a44
> > HOSTNAME = 'wg'

So your hostname is the same as the username?  Hmm.  I wonder if that's
the problem.  Back in NT4 days it was no problem to create a local
username identical to the hostname but it goes all trouble.  That's why
this is disallowed in Windows 2000 and later, which just refuse to
create such a username.  Of course Windows can't do the same check for
domain accounts.

[...time passes...]

Hmm, no.  I created a domain account using the same username as the name
of one of my XP client machines.  Then I logged in to that machine using
the new account and started the first Cygwin shell:

==== SNIP ====
Copying skeleton files.
These files are for the user to personalise their cygwin experience.

They will never be overwritten nor automatically updated.


cathi AT cathi ~
$ id
uid=11136(cathi) gid=10513(DomUsers) groups=0(root),544(Administrators),545(Users),10572(Denied RODC Password Replication Group),10513(DomUsers)

cathi AT cathi ~
$ echo $HOSTNAME
cathi

cathi AT cathi ~
$ ps -e
      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
      452       1     452        452    0 11136 10:30:38 /usr/bin/bash
      708     452     708       3904    0 11136 10:30:55 /usr/bin/ps

cathi AT cathi ~
$
==== SNAP ====

I have no idea why this happens for you.  Some debugging will be necessary.
Starting the first bash from strace might give a clue.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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