public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: home directory not created in cygwin installation
@ 2003-10-01 16:23 Hughes, Bill
  0 siblings, 0 replies; 10+ messages in thread
From: Hughes, Bill @ 2003-10-01 16:23 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

Sent: 01 October 2003 16:16 From: Igor Pechtchanski
> On Wed, 1 Oct 2003, Hughes, Bill wrote:

> > 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).
Doh! (Hits head on wall) Of course - I've been using an NT command prompt
all afternoon and can't type straight.

> > 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...
If you're using nontsec does it matter if it's invalid?
You're then only using it to look up the home directory of the current user.
Of course if it's just missing then you start playing with $HOME instead.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: home directory not created in cygwin installation
  2003-10-01 13:48     ` Igor Pechtchanski
@ 2003-10-02  2:38       ` Pierre A. Humblet
  0 siblings, 0 replies; 10+ messages in thread
From: Pierre A. Humblet @ 2003-10-02  2:38 UTC (permalink / raw)
  To: cygwin

On Wed, Oct 01, 2003 at 09:27:25AM -0400, Igor Pechtchanski wrote:
> On Wed, 1 Oct 2003, John Morrison wrote:
>
> > Igor, think there's anything /etc/profile could do about this?
> >
> > J.
> 
> John,
> 
> 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?
> 	Igor

Having HOME from Windows different from /etc/passwd is useful for domain
users. HOME can be set to a directory on a shared drive for use while 
working at the console, while /etc/passwd points a local directory to allow 
passwordless network access. I use that all the time.

Note that /etc/passwd is optional even with ntsec, as long as you don't
mind having a funny group name and as long as you don't need to chown, 
use cron, log in from the network, etc.. That's important for people 
who don't use Cygwin as a Unix-like work environment but only to
run standalone programs.

Pierre

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: home directory not created in cygwin installation
  2003-10-01 20:17   ` Ji-Wei Wu
@ 2003-10-01 21:36     ` Monique Y. Herman
  0 siblings, 0 replies; 10+ messages in thread
From: Monique Y. Herman @ 2003-10-01 21:36 UTC (permalink / raw)
  To: cygwin

On Wed, 01 Oct 2003 16:08:39 -0400, Ji-Wei Wu <Ji-Wei.Wu-1@nasa.gov> penned:
> My computer runs Windows 2000 Professional.  I verified $USER is correct 
> from cygwin but $HOME was not set during installation (I don't know 
> why).  I also noticed that the file /etc/profile does not seem to have the 
> lines to set HOME (comparing to other people's profile).  Now I have to set 
> HOME every time I start a cygwin shell.  Is there a way I can run the 
> profile to set HOME permanently after installation? Thanks.
> 

On your windows desktop:

Right-click on "My Computer" and go to properties.  Click on "Advanced"
tab.  Punch "Environment Variables" button.  Create new user variable
HOME with value something like C:\cygwin\home\user where user is the
username you want for your home.

-- 
monique


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: home directory not created in cygwin installation
  2003-09-30 23:00 ` Igor Pechtchanski
  2003-10-01  7:58   ` John Morrison
@ 2003-10-01 20:17   ` Ji-Wei Wu
  2003-10-01 21:36     ` Monique Y. Herman
  1 sibling, 1 reply; 10+ messages in thread
From: Ji-Wei Wu @ 2003-10-01 20:17 UTC (permalink / raw)
  To: cygwin

My computer runs Windows 2000 Professional.  I verified $USER is correct 
from cygwin but $HOME was not set during installation (I don't know 
why).  I also noticed that the file /etc/profile does not seem to have the 
lines to set HOME (comparing to other people's profile).  Now I have to set 
HOME every time I start a cygwin shell.  Is there a way I can run the 
profile to set HOME permanently after installation? Thanks.

At 06:32 PM 9/30/2003 -0400, you wrote:
>On Tue, 30 Sep 2003, Ji-Wei Wu wrote:
>
> > I downloaded and installed the latest cygwin today on my computer.  I
> > followed all defaults during installation (in c:\cygwin).  After that, I
> > started a cygwin bash shell but found that it did not start in the
> > /home/$USER directory ($USER means the user name I use to log onto my
> > computer).  The actual directory is /sygdrive/c, which means the c: drive
> > on my computer.  What went wrong in my installation and can anyone help me?
> >
> > Thanks.
>
>At a guess, your HOME is set incorrectly in Windows.
>Please read and follow the Cygwin problem reporting guidelines at
><http://cygwin.com/problems.html>.  This will provide enough information
>to venture a better guess or to find a solution for your problem.
>         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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: home directory not created in cygwin installation
  2003-10-01 15:12 Hughes, Bill
@ 2003-10-01 15:31 ` Igor Pechtchanski
  0 siblings, 0 replies; 10+ messages in thread
From: Igor Pechtchanski @ 2003-10-01 15:31 UTC (permalink / raw)
  To: Hughes, Bill; +Cc: cygwin

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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: home directory not created in cygwin installation
@ 2003-10-01 15:12 Hughes, Bill
  2003-10-01 15:31 ` Igor Pechtchanski
  0 siblings, 1 reply; 10+ messages in thread
From: Hughes, Bill @ 2003-10-01 15:12 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

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.
Furthermore could $HOME be defaulted to \home\'current_user' if not
explicitly set?

I can also see a case for using /etc/passwd if it exists whether, or not
ntsec is used or running on Win9x.
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.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: home directory not created in cygwin installation
  2003-10-01  7:58   ` John Morrison
@ 2003-10-01 13:48     ` Igor Pechtchanski
  2003-10-02  2:38       ` Pierre A. Humblet
  0 siblings, 1 reply; 10+ messages in thread
From: Igor Pechtchanski @ 2003-10-01 13:48 UTC (permalink / raw)
  To: John Morrison; +Cc: cygwin

On Wed, 1 Oct 2003, John Morrison wrote:

>
> On Tue, 30 Sep 2003, Igor Pechtchanski wrote:
> > On Tue, 30 Sep 2003, Ji-Wei Wu wrote:
> >
> > > I downloaded and installed the latest cygwin today on my computer.  I
> > > followed all defaults during installation (in c:\cygwin).  After that, I
> > > started a cygwin bash shell but found that it did not start in the
> > > /home/$USER directory ($USER means the user name I use to log onto my
> > > computer).  The actual directory is /sygdrive/c, which means the c: drive
> > > on my computer.  What went wrong in my installation and can anyone help me?
> > >
> > > Thanks.
> >
> > At a guess, your HOME is set incorrectly in Windows.
>
> Igor, think there's anything /etc/profile could do about this?
>
> J.

John,

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: home directory not created in cygwin installation
  2003-09-30 23:00 ` Igor Pechtchanski
@ 2003-10-01  7:58   ` John Morrison
  2003-10-01 13:48     ` Igor Pechtchanski
  2003-10-01 20:17   ` Ji-Wei Wu
  1 sibling, 1 reply; 10+ messages in thread
From: John Morrison @ 2003-10-01  7:58 UTC (permalink / raw)
  To: cygwin


On Tue, 30 Sep 2003, Igor Pechtchanski wrote:
> On Tue, 30 Sep 2003, Ji-Wei Wu wrote:
>
> > I downloaded and installed the latest cygwin today on my computer.  I
> > followed all defaults during installation (in c:\cygwin).  After that, I
> > started a cygwin bash shell but found that it did not start in the
> > /home/$USER directory ($USER means the user name I use to log onto my
> > computer).  The actual directory is /sygdrive/c, which means the c: drive
> > on my computer.  What went wrong in my installation and can anyone help me?
> >
> > Thanks.
>
> At a guess, your HOME is set incorrectly in Windows.

Igor, think there's anything /etc/profile could do about this?

J.


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: home directory not created in cygwin installation
  2003-09-30 21:50 Ji-Wei Wu
@ 2003-09-30 23:00 ` Igor Pechtchanski
  2003-10-01  7:58   ` John Morrison
  2003-10-01 20:17   ` Ji-Wei Wu
  0 siblings, 2 replies; 10+ messages in thread
From: Igor Pechtchanski @ 2003-09-30 23:00 UTC (permalink / raw)
  To: Ji-Wei Wu; +Cc: cygwin

On Tue, 30 Sep 2003, Ji-Wei Wu wrote:

> I downloaded and installed the latest cygwin today on my computer.  I
> followed all defaults during installation (in c:\cygwin).  After that, I
> started a cygwin bash shell but found that it did not start in the
> /home/$USER directory ($USER means the user name I use to log onto my
> computer).  The actual directory is /sygdrive/c, which means the c: drive
> on my computer.  What went wrong in my installation and can anyone help me?
>
> Thanks.

At a guess, your HOME is set incorrectly in Windows.
Please read and follow the Cygwin problem reporting guidelines at
<http://cygwin.com/problems.html>.  This will provide enough information
to venture a better guess or to find a solution for your problem.
	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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* home directory not created in cygwin installation
@ 2003-09-30 21:50 Ji-Wei Wu
  2003-09-30 23:00 ` Igor Pechtchanski
  0 siblings, 1 reply; 10+ messages in thread
From: Ji-Wei Wu @ 2003-09-30 21:50 UTC (permalink / raw)
  To: cygwin

I downloaded and installed the latest cygwin today on my computer.  I 
followed all defaults during installation (in c:\cygwin).  After that, I 
started a cygwin bash shell but found that it did not start in the 
/home/$USER directory ($USER means the user name I use to log onto my 
computer).  The actual directory is /sygdrive/c, which means the c: drive 
on my computer.  What went wrong in my installation and can anyone help me?

Thanks.


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-10-02  1:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-01 16:23 home directory not created in cygwin installation Hughes, Bill
  -- strict thread matches above, loose matches on Subject: below --
2003-10-01 15:12 Hughes, Bill
2003-10-01 15:31 ` Igor Pechtchanski
2003-09-30 21:50 Ji-Wei Wu
2003-09-30 23:00 ` Igor Pechtchanski
2003-10-01  7:58   ` John Morrison
2003-10-01 13:48     ` Igor Pechtchanski
2003-10-02  2:38       ` Pierre A. Humblet
2003-10-01 20:17   ` Ji-Wei Wu
2003-10-01 21:36     ` Monique Y. Herman

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