Re: Bug Report: Purging Old and Invalid User Names With Spaces

2007-03-17 Thread David Picton

  * From: Robert Peaslee 
   * To: cygwin at cygwin dot com
   * Date: Fri, 16 Mar 2007 17:19:18 -0400
   * References:
<[EMAIL PROTECTED]>



Thrall, Bryan wrote:



>Yes, WinXP stores your username twice ("Full name" and "User Name") and
>Cygwin uses the "hidden" one ("User Name"), but I'm pretty sure you
>don't have to reinstall XP to change it!




>IIRC, you can change the username from Control Panel->User
>Accounts->Advanced tab->Advanced button->Users->right click on the user
>and select "Rename". You might need to be Administrator to do this,
>though (and it only works for local users, so if you're on a domain, you
>need to contact the domain admin).


There's a slight problem here.  I have XP, but I can't see an Advanced
tab in the User Accounts window.  It lacks all advanced functionality,
so I use the Computer Management window as described below:


I no longer have XP installed, but found the same can be done in Vista by 
opening the
computer management window (Right click on my computer -> manage ), expanding 
the
"Local Users and Groups" tree, and clicking on "Users." Then the instructions 
are the
same as Bryan's, right click on the user and hit 'rename' to set a new username.


This does change the real username, and the change will take effect in
Cygwin once the password file has been rebuilt using mkpasswd (or
updated by hand).  (However, it should be noted that the user's
profile in Documents and Settings is not renamed).

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Bug Report: Purging Old and Invalid User Names With Spaces

2007-03-16 Thread Christopher Faylor
On Fri, Mar 16, 2007 at 10:49:36PM -, Thorsten Kampe wrote:
>* Robert Peaslee (Fri, 16 Mar 2007 16:52:40 -0400)
>> Actually, this information is incorrect.
>> 
>> Windows XP stores the first username you choose and will associate your 
>> current username to it regardless of what you change it to. Cygwin 
>> stores nothing, it is asking Windows what your username is and getting a 
>> response of what Windows tells it.
>
>Cygwin asks Windows at first install about the user names and creates 
>/etc/passwd. The problem is (or can be) that this list never gets updated 
>even if the user names change or new user are added.
>
>As Keith wrote:
>"Subsequent installations of CygWin utilize the aforementioned out of 
>date username list, even though those usernames have been changed and 
>are no longer valid."
>
>The secret is to run
>
>mkpasswd -l -c > /etc/passwd
>and
>mkgroup -l -c > /etc/group
>
>Also you have to run this if you're in a domain (because Cygwin retrieves 
>only the local user names, not the domain names).

Given that the OP admitted to wiping out his whole Cygwin installation, I
think it's a safe bet that he wiped out and regenerated his /etc/passwd.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Bug Report: Purging Old and Invalid User Names With Spaces

2007-03-16 Thread Thorsten Kampe
* Robert Peaslee (Fri, 16 Mar 2007 16:52:40 -0400)
> Actually, this information is incorrect.
> 
> Windows XP stores the first username you choose and will associate your 
> current username to it regardless of what you change it to. Cygwin 
> stores nothing, it is asking Windows what your username is and getting a 
> response of what Windows tells it.

Cygwin asks Windows at first install about the user names and creates 
/etc/passwd. The problem is (or can be) that this list never gets updated 
even if the user names change or new user are added.

As Keith wrote:
"Subsequent installations of CygWin utilize the aforementioned out of 
date username list, even though those usernames have been changed and 
are no longer valid."

The secret is to run

mkpasswd -l -c > /etc/passwd
and
mkgroup -l -c > /etc/group

Also you have to run this if you're in a domain (because Cygwin retrieves 
only the local user names, not the domain names).


Thorsten


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Bug Report: Purging Old and Invalid User Names With Spaces

2007-03-16 Thread Robert Peaslee

Thrall, Bryan wrote:

Yes, WinXP stores your username twice ("Full name" and "User Name") and
Cygwin uses the "hidden" one ("User Name"), but I'm pretty sure you
don't have to reinstall XP to change it!

IIRC, you can change the username from Control Panel->User
Accounts->Advanced tab->Advanced button->Users->right click on the user
and select "Rename". You might need to be Administrator to do this,
though (and it only works for local users, so if you're on a domain, you
need to contact the domain admin).

Also, as someone already said, it is trivial to replace the
names-with-spaces in the /etc/passwd file with names that have no
spaces, as long as you don't mess with the SID.

  

That is good information to have. Thanks for your reply, Bryan.

I no longer have XP installed, but found the same can be done in Vista 
by opening the computer management window (Right click on my computer -> 
manage ), expanding the "Local Users and Groups" tree, and clicking on 
"Users." Then the instructions are the same as Bryan's, right click on 
the user and hit 'rename' to set a new username.


--Robert Peaslee

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Bug Report: Purging Old and Invalid User Names With Spaces

2007-03-16 Thread Thrall, Bryan
Robert Peaslee wrote on Friday, March 16, 2007 3:53 PM:
> Windows XP stores the first username you choose and will associate
> your current username to it regardless of what you change it to.
> Cygwin stores nothing, it is asking Windows what your username is and
> getting a response of what Windows tells it. I can't verify this
> right now, but I do believe that if you navigate to C:\Documents and
> Settings\ you should find that your old usernames still exist in
> place of your new usernames. That should be verification that it is
> Windows that is acting strangely, and is not a Cygwin problem.
> 
> You can get around this by either reinstalling XP and setting up new
> usernames that are correct from the start, creating new users
> completely (not changing the names of existing users) and migrate
> your personal information to the new user profiles, or finally, just
> get used to typing quotes around your usernames or escaping the
> spaces when using Cygwin.

Yes, WinXP stores your username twice ("Full name" and "User Name") and
Cygwin uses the "hidden" one ("User Name"), but I'm pretty sure you
don't have to reinstall XP to change it!

IIRC, you can change the username from Control Panel->User
Accounts->Advanced tab->Advanced button->Users->right click on the user
and select "Rename". You might need to be Administrator to do this,
though (and it only works for local users, so if you're on a domain, you
need to contact the domain admin).

Also, as someone already said, it is trivial to replace the
names-with-spaces in the /etc/passwd file with names that have no
spaces, as long as you don't mess with the SID.

-- 
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Bug Report: Purging Old and Invalid User Names With Spaces

2007-03-16 Thread Robert Peaslee

Keith Mitchell wrote:
Problem: Virgin Installs of CygWin on Windows XP work fine but a total 
purge (deletion of all CygWin files and directories) and a fresh 
reinstall with different set of usernames do not work properly, i.e., 
usernames that have been CHANGED using the XP user manager to new 
usernames. This problem occurred as a result of my changing all my 
usernames with spaces to usernames without spaces to make them Linux 
compatible.


I wanted to thank all for the responses. After many reinstallations of 
CygWin, I finally identified the problem and got things working. This 
is just a bug report documenting my discoveries and what I believe is 
going on.


1. A virgin install of CygWin makes a list of all user names on the 
system. This list is reflected in /etc/passwd after any reinstall. I 
am guessing this list is stored in the Windows XP registry as this 
list does not exist on the drive where CygWin is installed, in my 
case, the D drive. This list is NEVER updated on subsequent CygWin 
installs. This is the REAL problem: no updates on subsequent installs.


2. Subsequent installations of CygWin utilize the aforementioned out 
of date username list, even though those usernames have been changed 
and are no longer valid


3. My problems occurred as a result of a conflict between the list of 
original usernames that are no longer valid created by the first 
virgin install of CygWin and usernames that currently valid after user 
manager changes. This registry entry (or whatever the source of the 
invalid usernames) entry needs either to either be purged before or 
updated as a result of subsequent CygWin installs.


Again thanks to all.

Keith Mitchell 

Actually, this information is incorrect.

Windows XP stores the first username you choose and will associate your 
current username to it regardless of what you change it to. Cygwin 
stores nothing, it is asking Windows what your username is and getting a 
response of what Windows tells it. I can't verify this right now, but I 
do believe that if you navigate to C:\Documents and Settings\ you should 
find that your old usernames still exist in place of your new usernames. 
That should be verification that it is Windows that is acting strangely, 
and is not a Cygwin problem.


You can get around this by either reinstalling XP and setting up new 
usernames that are correct from the start, creating new users completely 
(not changing the names of existing users) and migrate your personal 
information to the new user profiles, or finally, just get used to 
typing quotes around your usernames or escaping the spaces when using 
Cygwin.


--Robert Peaslee

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Bug Report: Purging Old and Invalid User Names With Spaces

2007-03-16 Thread Gustavo Seabra

Keith Mitchell wrote:
Problem: Virgin Installs of CygWin on Windows XP work fine but a total 
purge (deletion of all CygWin files and directories) and a fresh 
reinstall with different set of usernames do not work properly, i.e., 
usernames that have been CHANGED using the XP user manager to new 
usernames. This problem occurred as a result of my changing all my 
usernames with spaces to usernames without spaces to make them Linux 
compatible.


I wanted to thank all for the responses. After many reinstallations of 
CygWin, I finally identified the problem and got things working. This 
is just a bug report documenting my discoveries and what I believe is 
going on.


1. A virgin install of CygWin makes a list of all user names on the 
system. This list is reflected in /etc/passwd after any reinstall. I 
am guessing this list is stored in the Windows XP registry as this 
list does not exist on the drive where CygWin is installed, in my 
case, the D drive. This list is NEVER updated on subsequent CygWin 
installs. This is the REAL problem: no updates on subsequent installs.


2. Subsequent installations of CygWin utilize the aforementioned out 
of date username list, even though those usernames have been changed 
and are no longer valid


3. My problems occurred as a result of a conflict between the list of 
original usernames that are no longer valid created by the first 
virgin install of CygWin and usernames that currently valid after user 
manager changes. This registry entry (or whatever the source of the 
invalid usernames) entry needs either to either be purged before or 
updated as a result of subsequent CygWin installs.


Again thanks to all.

Keith Mitchell

Hi Keith,

In the end, you didn't mention HOW you solved the problem...

BTW, I had one problem with WinXP a lng time ago that could be 
related to that. I don't remember the details anymore, but the point is 
that after changing a username in WindowsXP, apparently the changes were 
made only "on the outside", meaning that I would "see" a different name 
but, internally, windows would still use the old one. Maybe what you are 
describing is really related to the way Windows handles the username 
changes, not Cygwin. (You can notice how much I "know" about that stuff, 
right :-) )


Gustavo.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Bug Report: Purging Old and Invalid User Names With Spaces

2007-03-16 Thread Christopher Faylor
On Fri, Mar 16, 2007 at 04:19:35PM -0400, Keith Mitchell wrote:
>Problem: Virgin Installs of CygWin on Windows XP work fine but a total 
>purge (deletion of all CygWin files and directories) and a fresh 
>reinstall with different set of usernames do not work properly, i.e., 
>usernames that have been CHANGED using the XP user manager to new 
>usernames. This problem occurred as a result of my changing all my 
>usernames with spaces to usernames without spaces to make them Linux 
>compatible.
>
>I wanted to thank all for the responses. After many reinstallations of 
>CygWin, I finally identified the problem and got things working. This is 
>just a bug report documenting my discoveries and what I believe is going on.
>
>1. A virgin install of CygWin makes a list of all user names on the 
>system. This list is reflected in /etc/passwd after any reinstall. I am 
>guessing this list is stored in the Windows XP registry as this list 
>does not exist on the drive where CygWin is installed, in my case, the D 
>drive. This list is NEVER updated on subsequent CygWin installs. This is 
>the REAL problem: no updates on subsequent installs.

Just in case it isn't clear: *Cygwin* does not store a list of usernames
in the registry.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Bug Report: Purging Old and Invalid User Names With Spaces

2007-03-16 Thread Keith Mitchell
Problem: Virgin Installs of CygWin on Windows XP work fine but a total 
purge (deletion of all CygWin files and directories) and a fresh 
reinstall with different set of usernames do not work properly, i.e., 
usernames that have been CHANGED using the XP user manager to new 
usernames. This problem occurred as a result of my changing all my 
usernames with spaces to usernames without spaces to make them Linux 
compatible.


I wanted to thank all for the responses. After many reinstallations of 
CygWin, I finally identified the problem and got things working. This is 
just a bug report documenting my discoveries and what I believe is going on.


1. A virgin install of CygWin makes a list of all user names on the 
system. This list is reflected in /etc/passwd after any reinstall. I am 
guessing this list is stored in the Windows XP registry as this list 
does not exist on the drive where CygWin is installed, in my case, the D 
drive. This list is NEVER updated on subsequent CygWin installs. This is 
the REAL problem: no updates on subsequent installs.


2. Subsequent installations of CygWin utilize the aforementioned out of 
date username list, even though those usernames have been changed and 
are no longer valid


3. My problems occurred as a result of a conflict between the list of 
original usernames that are no longer valid created by the first virgin 
install of CygWin and usernames that currently valid after user manager 
changes. This registry entry (or whatever the source of the invalid 
usernames) entry needs either to either be purged before or updated as a 
result of subsequent CygWin installs.


Again thanks to all.

Keith Mitchell

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/