This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SOLVED [1.7] login ignores /etc/passwd in first invokation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]