X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Wolfgang Goetz Subject: SOLVED [1.7] login ignores /etc/passwd in first invokation Date: Wed, 22 Jul 2009 19:59:02 +0200 Lines: 68 Message-ID: References: <20090721083720 DOT GX27613 AT calimero DOT vinschen DOT de> <20090722104217 DOT GG27613 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090702 Lightning/0.9 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666 In-Reply-To: <20090722104217.GG27613@calimero.vinschen.de> 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 Corinna Vinschen wrote: > On Jul 21 21:18, Wolfgang Goetz wrote: >> Corinna Vinschen wrote: >> snippet from 'net config workstation': >> ... >> Workstation domain EMEA >> ... >> Logon domain AD1 >> >>> Are you sure /etc/passwd is really correct? >> made with mkpasswd -l -d, homepath changed for my account. > > I'm not entirely sure, but it might help to call `mkpasswd -l -d AD1 > instead. > *cool*, that's it. maybe a flaw in mkpasswd asking the 'wrong' domain? > Nevertheless Cygwin only recognizes 9 valid lines. Even if the passwd > file has more lines, the number of lines accepted by Cygwin can be less, > if the content is not valid. But that should only happen if the uid and > gid fields are not valid unsigned long values, which is quite unlikely. yepp, different valid accounts. -d AD1: wg:unused:16532:10513:GOETZ WOLFGANG,U-AD1\wg,S-1-5-21-2035491313-1038499582-81669161-6532:/cygdrive/d/home/wg:/bin/bash -d : wg:unused:129529:10513:GOETZ WOLFGANG,U-EMEA\wg,S-1-5-21-2053067395-845162621-1245804459-119529:/cygdrive/d/home/wg:/bin/bash > How big is your /etc/passwd in bytes and how many lines does it have? it's in the second strace... line 191: 2795 206514 [main] bash 5668 pwdgrp::load: \etc\passwd curr_lines 41803 4.0K passwd 4.0K passwd-ad1-useronly (from script below) 856K passwd-full-ad1 (mkpasswd -l -d AD1) 856K passwd-full-ad1-homepath (homepateh edited manually) 5.9M passwd-full-default (mkpasswd -l -d) 4.0K passwd-useronly (from script below w/o $logondomain) thanks-a-lot kind regards Wolfgang p.s.: /etc/profile part for passwd generation is now: ... logondomain=$(net config workstation|awk '/Logon domain/{print $3}') mkpasswd -l > /etc/passwd mkpasswd -d $logondomain -p $homedrive/home -u $USER >> /etc/passwd echo passwd generated. please start a new shell. sleep 5 exit p.p.s.: using zsh with the wrong passwd has the same 'forget-the-first-shell' behaviour. -- 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