No home directory on fresh setup
Andrew DeFaria
Andrew@DeFaria.com
Thu Feb 21 07:49:00 GMT 2002
Pavel Tsekov wrote:
> Hello Jan,
>
> Thursday, February 21, 2002, 2:50:36 PM, you wrote:
>
> VJvd> A fresh installation of the latest cygwin results in no home directory. One
> VJvd> enters in /usr/bin/<user>.
>
> This problem is not new and it's already fixed in CVS sources. It's
> specific to Win9x/ME installations only.
>
> For more details: http://sources.redhat.com/ml/cygwin/2002-01/msg01903.html
>
> If you intend to add new users (via mkpasswd) to your current
> installation, have in mind that the mkpasswd program should be
> passed the -p or --path-to-home option in order to add the
> appropriate entry in /etc/passwd.
I've always wondered, why not simply take the home path that Windows generates? When
I run mkpassed I use -d because I'm in a domain (which, BTW, I think the Cygwin install
should do by default and if mkpasswd cannot contact the domain controller then it should
switch to -l) I get a path in the HOME field to the users home directories. I later scripted
this to change entries like \\<server>\Users\${USER}$ (don't know why the domain controller has
trailing $'s) to /home/${USER} and ensure that \\<server>\Users is mounted to /home later on.
Finally I have changed /etc/profile to grab this HOME directory field from passwd, check
to make sure it's a valid directory then set $HOME to it. Otherwise echo a warning and create
a /home/${USER} local home directory. I also export the SHELL to avoid that problem.
/etc/profile is symlinked to a global /etc/profile as is /etc/passwd and /etc/group. This
makes maintaince easy and global. However I've found that telnet and rlogin do not like a
symlinked /etc/passwd or /etc/group but only on NT 4. My setup script therefore copies the
current global /etc/passwd, which is a problem but I don't know of a better fix.
--
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/
More information about the Cygwin
mailing list