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: home directory not created in cygwin installation


On Wed, 1 Oct 2003, Hughes, Bill wrote:

> Sent: 01 October 2003 14:27 From: Igor Pechtchanski
> > This is thin ice...  On one hand, we want to make things work pretty
> > seamlessly.  On the other, we don't want to limit the more advanced users
> > by not letting them change the home directory on the fly (anyone doing
> > that, anyway?).  One "solution" I can see is to ignore the $HOME setting
> > completely, and always go by /etc/passwd.  I think this was discussed
> > before, but can't recall the details.  One caveat I see is that this would
> > require an existing (and valid) /etc/passwd, whereas nowadays it's
> > optional (with "nontsec" or in Win9x).  I don't know if this will daunt
> > the advanced users, but it's probably something to discuss.  Opinions?
>
> Is it possible to:
> use /etc/passwd if running with ntsec and file exists,
> else if /etc/passwd not present, nontsec or on 9X use $HOME.

In other words, you're suggesting that the /etc/passwd entry take
precedence over the existing $HOME setting...  That could work.

> Furthermore could $HOME be defaulted to \home\'current_user' if not
> explicitly set?

It already is, except it's "/home/$USER", not "\home\$USER" (read up on
POSIX vs Win32 paths in Cygwin if you don't see the difference).

> I can also see a case for using /etc/passwd if it exists whether, or not
> ntsec is used or running on Win9x.

You can have an /etc/passwd even with nontsec...  The only problem is that
there is no way that I know of to check it for validity...

> i.e. Whichever happens first:
> 1) Current user has entry in /etc/passwd, use value from here.
> 2) $HOME set by user.
> 3) Default $HOME to /home/'current_user'.
>
> Is the current user set in 9X? It's been a long time since I used this.

It is (or should be).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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


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