delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/04/17/12:30:02

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=VbHSgdwrHXtzeG5AqGahKAqkDLIaFCOWSLmsnilp2f0IV3oRwz/3O
OiomCyrCGSY4CtNpY95hTre5EB1BjHnRT9xzz6R0PAbzHvwXmyw1T5V4MfzFcReL
oeY/7aZByUyoB34/jn/Mi3nh0rhjbf9xpesT+Y0gmpjMak79qGK/+w=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=/hFqLcYEpS7ASgB9hUK/0zlNcZU=; b=t9m7Zqr7Q7PwNflgGDahxdsyxDJv
iWJuY0+Bk91H7UtqziwRNJxFH5jard/+pBvTZNPRH9nyxol4X9eZGCzjUGNlo38G
3V0Mj5ARzQajPDyyNNpgEDyTwGlkWbVvmyy/u/Y8OHki5LWKJBVuz+MeLN6VCrVI
smwbP0gQ+2g1/Pc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: calimero.vinschen.de
Date: Fri, 17 Apr 2015 18:29:42 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: NTSEC db_home
Message-ID: <20150417162942.GG3657@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAK-n8j6mahSQtjO+Qok-4iP+bL3=L2ikdgiZywMP4VK8DXcYpQ AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAK-n8j6mahSQtjO+Qok-4iP+bL3=L2ikdgiZywMP4VK8DXcYpQ@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)

--3WLtXmtPTeS+BWmV
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Apr 17 10:07, Jim Reisert AD1C wrote:
> I'm having a little trouble with the db_home: setting at work
> (corporate network, not using /etc/passwd or /etc/group).  Regarding:
>=20
>   https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-home
>=20
> I tried "db_home: /%H" and although my MINTTY session started in the
> correct directory, ssh-keygen wanted to use the directory defined by
> HOMESHARE instead, which points somewhere else (a local Unix server).
> Note that both HOMEDRIVE (+HOMEPATH) and HOMESHARE ultimately point to
> the same place:
>=20
> DOS view of the world:
>=20
> c:\>set | grep HOME
> HOME=3DC:\Home

Bzzz.

You seem to misinterpret what %H means.  It's the same thing as setting
db_home to the windows scheme.  Here's the relevant part from the docs:

  windows

    The user's home directory is set to the same directory which is used
    as Windows home directory. This is the homeDirectory AD attribute.
    For SAM accounts, this is equivalent to the "Home folder" setting in
    SAM. If both attributes are unset, Cygwin falls back to the user's
    local profile directory, typically something along the lines of
    C:\Users\$USERNAME. Of course, the Windows directory is converted to
    POSIX-style by Cygwin.=20

Check with `getent passwd $USER'.  Your home dir from the Cygwin POV=20
is what *Windows* sets, not your personal $HOME setting from the
environment.  I bet you'll see "//corp.ad.broadcom.com/DENA/home/reisert"
in the getent output.

By setting $HOME to a directory different from your home dir in the
passwd entry, you're confusing your tools.  Some of them will happily
use $HOME, others will use the entry from the account DB (what getent
returns).

The bottom line is, don't do that.  You have enough configuration
methods in /etc/nsswitch.conf, AD, or SAM to set your home dir
correctly.  Setting $HOME manually to a differnet value is just
asking for trouble.


HTH,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--3WLtXmtPTeS+BWmV
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVMTT1AAoJEPU2Bp2uRE+gb7EP/0gHs3M5koGpDd3TPjEjK/HF
IYxWgGx6AHmSJpt1H8Out2XFUf+n07Fz+0AszZ6664pFHH9upoVDmcIixc1mMzee
yT7vKXHBMDqsqpgEXuqA02NqF4mALW7WuhHFMqVB0f/80VK8UNfyLSf6jm9u+Pmd
Q8CVaKG8tk72ETJgntJrrIMATxLXD0wZ4EQ/K/g5FwEaUPlsOzTTRdUyCsXndWk0
p9d65OyOMKFXsWJ8goWH07z9+D/uDyR2HXKkyhVxQ1tvFh+2nXOoQ+mgV6AUodS3
5JdvcfDLsOyEpYtr6B3vUowgCFsyACnFF5z6q2HlfyPLSkGx3FNLRp5ke8XPB19k
e1mCrC+j0qFVyTAoickFHPnnD4SIXsCXIn1aZdaMa2oy7Xxb0fO5cgEX1mlAsRWM
6eoL/XCOwtvgztFWzkVR4gVtRSJUTMY7PwO2UFN54EM0/Y1trxdHLp7g8MHF7dpE
In5xzeh8iMWkTIVMM+9ZOoiWiIPXLleBOUT11HGJGbMuJYzhdn8c9zdhHRdtgWmX
FRQg/5/eTVTuYRiioQVYqVKNnHmaKQfz1yGpZ2ozM3+eeZWbscHC9XifRPL7hfvE
LFr6YggLv+Ys8NZcrFDRo9o2XbYdvBVk4ci5wmZJexoFfbHpPJIuw6yEYe4kDGFg
PTDQieN6oO6YUZbjHq2U
=yq0P
-----END PGP SIGNATURE-----

--3WLtXmtPTeS+BWmV--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019