This is the mail archive of the cygwin@cygwin.com 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]

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/


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