delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/18/15:41:45

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <023814FAC196D5119E4A00D0B76C0F9805205E@mmuc.definiens.com>
From: "Bleyer, Michael" <MBleyer AT DEFiNiENS DOT com>
To: "'Bernard Dautrevaux'" <Dautrevaux AT microprocess DOT com>,
"'Peter Buckley'"
<peter DOT buckley AT cportcorp DOT com>
Cc: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: RE: login account is "Administrator" not "username"
Date: Mon, 18 Mar 2002 21:24:41 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

Thanx for your quick advice (it works). May I suggest an extension (add to
FAQ?):

change the batch file cygwin.bat as follows:

### snip ###
@echo off
C:
chdir \cygwin

bin\grep -q %USERNAME%: etc\passwd
IF ERRORLEVEL 1 GOTO setuppass
goto start

:setuppass
bin\mkpasswd -l > etc\passwd
bin\mkpasswd -d | grep %USERNAME% >> etc\passwd

:start
chdir \cygwin\bin
bash --login -i

### snap ###

This checks if the WinNT domain USERNAME is already in the passwd file. If
not, it gets appended.
So this works automatically even with a user switching machines (first time
login) without the necessity to add all domain users to every machine.
Of course in big domains mkpasswd -d causes a delay, but that will only
happen once during first-time login.

Alternatively, how about an option/script that runs from setup.exe, by
default asking to add the current WinNT user to the passwd file?

greetings,
Michael

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019