This is the mail archive of the
mailing list for the Cygwin project.
Re: howto change home path in /etc/passwd
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: sferriol <Sylvain dot Ferriol at imag dot fr>
- Cc: cygwin at cygwin dot com
- Date: Mon, 12 May 2003 10:34:59 -0400 (EDT)
- Subject: Re: howto change home path in /etc/passwd
- Reply-to: cygwin at cygwin dot com
Please do not send personal e-mail. I read the list. I've explicitly set
Reply-To: to point to the list. This means I want the replies to go to
the list. Please make sure your mailer honors that header field.
On Mon, 12 May 2003 Sylvain.Ferriol@imag.fr wrote:
> Surlignage Igor Pechtchanski <firstname.lastname@example.org>:
> > On Mon, 12 May 2003 Sylvain.Ferriol@imag.fr wrote:
> > > Surlignage Igor Pechtchanski <email@example.com>:
> > >
> > > > On Mon, 12 May 2003, sferriol wrote:
> > > >
> > > > > hello
> > > > > is there a command to change the home directory of a user in
> > /etc/passwd
> > > > > because ssh sees this file before $HOME and i have always a error.
> > > >
> > > > Use an editor to edit /etc/passwd (as has been suggested). Mind the
> > line
> > > > endings (I think).
> > >
> > > no my question is to do this automatically
> > > because when the admin has installed cygwin on a computer, it adds users
> > > and each users has to define the variable HOME,
> > > but if they use ssh, they have to chang /etc/passwd too.
> > >
> > > i want to create a install file which update automatically /etc/passwd,
> > puts defaults files (bashrc, inputrc,...)
> > > i see that there is the mkpasswd command but it doesn't do what i want
> > >
> > > do you know when /etc/passwd is created???
> > >
> > > sylvain
> > /etc/passwd is normally created (along with /etc/group) when setup runs
> > the passwd-grp.sh postinstall script. The program that actually creates
> > the passwd entries is called mkpasswd, and it sets the home directory to
> > /home/<username> by default.
> > One thing you can do is create symbolic links (or, better yet, user
> > mounts) from /home/<username> to that user's $HOME. That way, you will
> > not have to change /etc/passwd at all.
> OK but do you know how to get the username because in the cygwin terminal
> echo $USER or echo $USERNAME works
> but i 'm using a file install.bat which calls 'bash.exe instal.sh'
> and in install.sh:
> echo $USER....nothing
> echo $USERNAME....nothing
> any suggestions???
Also, take a look at the default /etc/profile.
|\ _,,,---,,_ firstname.lastname@example.org
ZZZzz /,`.-'`' -. ;-;;,_ email@example.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
Problem reports: http://cygwin.com/problems.html