db_home setting in nsswitch.conf is ignored.

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Jul 22 16:57:00 GMT 2015

On Jul 22 15:33, Shaun Martin wrote:
> I'm trying to set the HOME directory of Cygwin to a local folder. My computer is on a network and the Windows HOME variable is being mapped to a network drive. I'm not able to change this. And for some reason, this causes the default HOME directory for my Cygwin terminal to be set as either "/cygdrive/c/Users/shaun/Desktop/SERVER/USERS5:USERS/SHAUN" if I'm using mintty or "/usr/bin/SERVER/USERS5:USERS/SHAUN" if I'm using PowerShell. 
> I tried changing the /etc/nsswitch.conf, but any value I put into db_home does not seem to do anything. I was able to test that "db_shell: /bin/sh" did change my shell from bash to sh. Here are some of the values I tried for db_home in nsswitch.conf:
> db_home: /cygdrive/c/users/shaun/apps/cygwin/home/shaun 
> db_home: /%H/Apps/cygwin/home/shaun 
> db_home: unix /%H/Apps/cygwin/home/shaun 
> db_home: cygwin desc 
> db_home: cygwin /path /%H/Apps/cygwin/home/shaun
> I asked about this on superuser.com, http://superuser.com/questions/942908/changing-the-home-for-cygwin
>  , which pointed me here.

Is HOME set in the Windows environment already?  If so, this
might interact with the setting in /etc/nsswitch.conf, which *only*
works for entries taken from the passwd DB (getpwnam, getpwuid calls).

How do you start mintty?  It should be started with a single parameter,
a dash, e.g.:

  C:\cygwin64\bin\mintty.exe -


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150722/5324d38b/attachment.sig>

More information about the Cygwin mailing list