login.conf: tc overwrites setenv
Bertram Scharpf
lists at bertram-scharpf.de
Sat Aug 27 14:35:56 UTC 2016
On Friday, 26. Aug 2016, 08:33:48 -0400, Roger Pate wrote:
> On Fri, Aug 26, 2016 at 7:15 AM, Bertram Scharpf
> <lists at 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
More information about the freebsd-questions
mailing list