delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/04/05/11:53:01

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
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Sat, 5 Apr 2003 11:52:50 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: alan DOT miles AT ieee DOT org
cc: kaio <electabuzz AT katamail DOT com>, <cygwin AT cygwin DOT com>
Subject: RE: WinXP username with spaces --> wmaker ko
In-Reply-To: <JLEBIHHBMBHBAFPAJLEFOEFCDFAA.miles0201@cox.net>
Message-ID: <Pine.GSO.4.44.0304051146280.21921-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

Alan,

The "fix" below has a few problems (one of which is unconditionally
removing /etc/passwd).  IMO, it's better to fix the scripts that have
improper quoting, or, barring that, unset HOME in your Windows environment
(or modify /etc/profile) and make sure your username doesn't contain a
space.  Going out of your way to accomodate scripts without proper quoting
will only lead to the proliferation of such scripts.
	Igor

On Sat, 5 Apr 2003, Alan Miles wrote:

> All,
>
> I have the same problem (on my machine at home) - However I do have a
> (partial) solution (I am still working on the final solution):
>
> This has to be done after CYGWIN installation, but BEFORE and user logon.
> Edit the /etc/passwd file and replace the space in the first field, and edit
> the field /home/<something with space> to /home/<something_with_out_space>
> and save.
>
> I am working on a scripting solution to install as part of my installation -
> maybe this could be incorporated as part of the "main" CYGWIN release.
>
> Below is a script fragment on how I am proposing to "automate" this fix.
>
> ThePasswordFile="/etc/passwd"
> ModUserName="$(/usr/bin/echo "${USER}" | /usr/bin/sed -e 's/ /_/g')"
>
> ...
>
> ModHomeUserName="$(/usr/bin/basename "${HOME}" | /usr/bin/sed -e 's/ /_/g')"
> ModHomeUserDirName="$(/usr/bin/dirname "${HOME}")/"
> ModHome="${ModHomeUserDirName}${ModHomeUserName}"
>
> /usr/bin/rm -f "${ThePasswordFile}"
>
> if [ ! -e "${ThePasswordFile}" -a ! -L "${ThePasswordFile}" ]
> then
>    /usr/bin/mkpasswd -l -c | /usr/bin/gawk -F':' -v oldUser="${USER}" -v newUser="${ModUserName}" -v newUserHomeDir="${ModHome}" ' BEGIN {OFS=":" ; } $1 ~ oldUser {$1=newUser ; $6=newUserHomeDir; } {print $0 ; } ' > "${ThePasswordFile}"
> fi
>
> Hope this helps.
>
> Alan
> -----Original Message-----
> From: kaio [mailto:electabuzz AT katamail DOT com]
> Sent: April 4, 2003 10:48
> To: cygwin AT cygwin DOT com
> Subject: WinXP username with spaces --> wmaker ko
>
>
> i have my administrator user named with a space on WInXP.
> cygwin installation is ok, but windowmaker don't install: seems that the
> space generates a new parameter in installation commands!
> in fact, wmaker installation creates a new dir in /home/ with the first half
> of username!

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Knowledge is an unending adventure at the edge of uncertainty.
  -- Leto II


--
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