tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sh(1) and ksh(1) default PATH



On Sun, Aug 14, 2022 at 09:58:46AM +0200, Martin Husemann wrote:
> On Sun, Aug 14, 2022 at 07:36:17AM +0000, nia wrote:
> > Display managers do not create login shells, and xdm was used.
> 
> Adapt the default /etc/X11/xdm/Xsession instead? Maybe make it extract
> PATH from /etc/sh.rc ?
> 
> Martin

Actually, I already did this in CURRENT a while ago - nobody has
complained yet ;)

There are a few remaining cases where the sh(1) defaults are Bad:

1. We can't assume XDM. Lots of desktop environments have their own
   preferred login manager which may have inconsistent behaviour
   and not preserve PATH or editing settings.

2. There are other situations where login shells are not
   created, for example, frequently when working with
   scripts to manage chroots.

3. There are plenty of ways to mess up creating user accounts
   (don't pass -m to useradd and create the home directory
   afterwards) where "why are commands suddenly missing from
   my shell" is a thing new users can easily stumble into.


Home | Main Index | Thread Index | Old Index