Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Aug 2016 16:30:33 +0200
From:      Bertram Scharpf <lists@bertram-scharpf.de>
To:        Roger Pate <roger@qxxy.com>, freebsd-questions@freebsd.org
Subject:   Re: login.conf: tc overwrites setenv
Message-ID:  <20160827143033.GA8953@becker.bs.l>
In-Reply-To: <CADTH-os9EMRubnJA6eRgUS%2B3cSoBYH6-7m9M0_RN6vAg5Eet3w@mail.gmail.com>
References:  <20160826111512.GA70960@becker.bs.l> <CADTH-os9EMRubnJA6eRgUS%2B3cSoBYH6-7m9M0_RN6vAg5Eet3w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, 26. Aug 2016, 08:33:48 -0400, Roger Pate wrote:
> On Fri, Aug 26, 2016 at 7:15 AM, Bertram Scharpf
> <lists@bertram-scharpf.de> wrote:
> > /etc/login.conf
> >
> > default:\
> >         :setenv=[...],EDITOR=vi:\
> >         :[...]:
> >
> > german|German Users Accounts:\
> >         :charset=UTF-8:\
> >         :lang=de_DE.UTF-8:\
> >         :setenv=LC_COLLATE=C:\
> >         :tc=default:
> >
> > The tc directive imports all directives from "default" but
> > then, "setenv" is overwritten.
> >
> $ ssh otherhost cat .login_conf
> # $FreeBSD: releng/10.2/share/skel/dot.login_conf 77995 2001-06-10
> 17:08:53Z ache $
> #
> # see login.conf(5)
> #
> me:\
>     :setenv=WASHERE=42:
> $ ssh -t otherhost env | grep WASHERE
> WASHERE=42

That works. It doesn't overwrite the setenv from /etc. Thank
you!

Yet, I decided to remove the setenv from "german" and to
put the LC_COLLATE=C into "default".

Another possible solution could have been setting the
variable in /etc/rc.conf:

  sshd_env="WASHERE_RCCONF=x"

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160827143033.GA8953>