This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: login account is "Administrator" not "username"
- 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>
- Date: Mon, 18 Mar 2002 21:24:41 +0100
- Subject: RE: login account is "Administrator" not "username"
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/