* RE: login account is "Administrator" not "username"
@ 2002-03-18 13:20 Bleyer, Michael
0 siblings, 0 replies; 6+ messages in thread
From: Bleyer, Michael @ 2002-03-18 13:20 UTC (permalink / raw)
To: 'Bernard Dautrevaux', 'Peter Buckley'
Cc: 'cygwin@cygwin.com'
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: login account is "Administrator" not "username"
2002-03-18 10:49 Bernard Dautrevaux
2002-07-11 19:37 ` Dennis W. Bulgrien
@ 2002-07-11 19:53 ` Dennis W. Bulgrien
1 sibling, 0 replies; 6+ messages in thread
From: Dennis W. Bulgrien @ 2002-07-11 19:53 UTC (permalink / raw)
To: cygwin
Edit /etc/passwd and change:
DBulgrien:unused_by_nt/2000/xp:11158:10513:Dennis
Bulgrien,U-VCSD\DBulgrien,S-1-5-21-1346715644-1892305490-5522801-1158://ntsr
vr/Users/dbulgrien:/bin/bash
from "//ntsrvr/Users/DBulgrien" to "/home/dbulgrien".
--
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: login account is "Administrator" not "username"
2002-03-18 10:49 Bernard Dautrevaux
@ 2002-07-11 19:37 ` Dennis W. Bulgrien
2002-07-11 19:53 ` Dennis W. Bulgrien
1 sibling, 0 replies; 6+ messages in thread
From: Dennis W. Bulgrien @ 2002-07-11 19:37 UTC (permalink / raw)
To: cygwin
Same problem as Michael had. I ran mkpasswd and mkgroup as recommened. My
login prompt now says Dbulgrien@DBULGRIEN (my NT server login is dbulgrien,
pc's name is DBULGRIEN). LS shows the contents of my NT server home
directory rather than a cygwin local drive home directory;
C:\cygwin\home\administrator\ exists but C:\cygwin\home\dbulgrien\ does not.
How do I fix that?
"Bernard Dautrevaux" <Dautrevaux@microprocess.com> wrote in message
news:17B78BDF120BD411B70100500422FC6309E4EC@IIS000...
> $ mkpasswd -d -l > /etc/passwd
> $ mkgroup -d -l > /etc/group
--
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: login account is "Administrator" not "username"
@ 2002-03-18 10:49 Bernard Dautrevaux
2002-07-11 19:37 ` Dennis W. Bulgrien
2002-07-11 19:53 ` Dennis W. Bulgrien
0 siblings, 2 replies; 6+ messages in thread
From: Bernard Dautrevaux @ 2002-03-18 10:49 UTC (permalink / raw)
To: 'Bleyer, Michael', 'cygwin@cygwin.com'
> -----Original Message-----
> From: Bleyer, Michael [mailto:MBleyer@DEFiNiENS.com]
> Sent: Monday, March 18, 2002 7:13 PM
> To: 'cygwin@cygwin.com'
> Subject: login account is "Administrator" not "username"
>
>
>
> I am logged in as user "jdoe" and have administrator rights
> on a WinNT box.
> I installed the most recent stable cygwin on this box (logged
> in as user
> "jdoe"), usable for "all".
>
> However, the cygwin shell tells me:
> ~ $ whoami
> Administrator
>
> and gives me the following environment variable settings:
> USER=Administrator
> USERNAME=jdoe
If you are on NT and logged in as Domain user (not a local user) this may be
related to the /etc/passwd setting. As already discussed on this list you
get strange results when logged in as a Domain user if you keep th enormal
/etc/passwd and /etc/group files as created initially by Cygwin.
You *must* in this case be sure you have an entry for your user/group in the
proper files. For that there is two solutions:
1) You have a relatively small NT Domain (less than a thousand user perhaps)
and you can simply do:
$ mkpasswd -d -l > /etc/passwd
$ mkgroup -d -l > /etc/group
This will last for a minute or so (for about 100 entries it takes less than
10 seconds) and you should be up and running.
2) You have a *huge* NT Domain; then just create the entries needed in
/etc/passwd (/etc/group should be sufficiently small to be created
normally):
$ mkgroup -d -l > /etc/group
$ mkpasswd -l > /etc/passwd
$ mkpasswd -u jdoe -d >> /etc/passwd
>
> and consequently:
> ~ $ pwd
> /home/Administrator
>
Here you should then get your normal NT home (%HOMEDRIVE%%HOMEPATH%)
>
> Obviously cygwin logs me in as "Administrator" instead of "jdoe", even
> though I logged in as user jdoe under WinNT
> (USERNAME=jdoe in a DOS box).
> Is there a way to change/avoid this? I tried installing
> cygwin as "usable
> only for me" but it's just the same.
> I've tried the registry, FAQ and mailing list archives to no avail.
>
> A problem arises when I use cvs for example, as it gets my
> username from the
> env variable USER and all my files get checked in from user
> "Administrator"
> as opposed to "jdoe". I could of course hack around this, but
> maybe there is
> a simpler solution?
>
> Thanks for any help,
You're welcome
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: dautrevaux@microprocess.com
b.dautrevaux@usa.net
--------------------------------------------
--
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: login account is "Administrator" not "username"
2002-03-18 10:18 Bleyer, Michael
@ 2002-03-18 10:31 ` Peter Buckley
0 siblings, 0 replies; 6+ messages in thread
From: Peter Buckley @ 2002-03-18 10:31 UTC (permalink / raw)
To: Bleyer, Michael; +Cc: 'cygwin@cygwin.com'
Look at the file /etc/passwd. Is your jdoe username in there? If you are
in a windows NT domain, and jdoe is a domain user, you will need to type
"mkpasswd -u jdoe >> /etc/passwd" from a bash shell to create an entry
for jdoe. Alternately you can use "mkpasswd -d >> /etc/passwd" to
populate the passwd file with all domain users.
HTH,
Peter
Bleyer, Michael wrote:
> I am logged in as user "jdoe" and have administrator rights on a WinNT box.
> I installed the most recent stable cygwin on this box (logged in as user
> "jdoe"), usable for "all".
>
> However, the cygwin shell tells me:
> ~ $ whoami
> Administrator
>
> and gives me the following environment variable settings:
> USER=Administrator
> USERNAME=jdoe
>
> and consequently:
> ~ $ pwd
> /home/Administrator
>
>
> Obviously cygwin logs me in as "Administrator" instead of "jdoe", even
> though I logged in as user jdoe under WinNT
> (USERNAME=jdoe in a DOS box).
> Is there a way to change/avoid this? I tried installing cygwin as "usable
> only for me" but it's just the same.
> I've tried the registry, FAQ and mailing list archives to no avail.
>
> A problem arises when I use cvs for example, as it gets my username from the
> env variable USER and all my files get checked in from user "Administrator"
> as opposed to "jdoe". I could of course hack around this, but maybe there is
> a simpler solution?
>
> Thanks for any help,
> 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/
>
>
--
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* login account is "Administrator" not "username"
@ 2002-03-18 10:18 Bleyer, Michael
2002-03-18 10:31 ` Peter Buckley
0 siblings, 1 reply; 6+ messages in thread
From: Bleyer, Michael @ 2002-03-18 10:18 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
I am logged in as user "jdoe" and have administrator rights on a WinNT box.
I installed the most recent stable cygwin on this box (logged in as user
"jdoe"), usable for "all".
However, the cygwin shell tells me:
~ $ whoami
Administrator
and gives me the following environment variable settings:
USER=Administrator
USERNAME=jdoe
and consequently:
~ $ pwd
/home/Administrator
Obviously cygwin logs me in as "Administrator" instead of "jdoe", even
though I logged in as user jdoe under WinNT
(USERNAME=jdoe in a DOS box).
Is there a way to change/avoid this? I tried installing cygwin as "usable
only for me" but it's just the same.
I've tried the registry, FAQ and mailing list archives to no avail.
A problem arises when I use cvs for example, as it gets my username from the
env variable USER and all my files get checked in from user "Administrator"
as opposed to "jdoe". I could of course hack around this, but maybe there is
a simpler solution?
Thanks for any help,
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-07-11 23:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-18 13:20 login account is "Administrator" not "username" Bleyer, Michael
-- strict thread matches above, loose matches on Subject: below --
2002-03-18 10:49 Bernard Dautrevaux
2002-07-11 19:37 ` Dennis W. Bulgrien
2002-07-11 19:53 ` Dennis W. Bulgrien
2002-03-18 10:18 Bleyer, Michael
2002-03-18 10:31 ` Peter Buckley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).