#1041362 login: remove /bin and /sbin from default $PATH

Package:
login
Source:
login
Description:
system login tools
Submitter:
Date:
2025-05-07 10:36:02 UTC
Severity:
normal
Tags:
#1041362#5
Date:
2023-07-18 00:04:17 UTC
From:
To:
Dear Maintainer,

Debian 13 (trixie) only supports usrmerged systems, therefore /bin will always be a symlink to /usr/bin, and /sbin will always be a symlink to /usr/sbin.

Please remove /bin and /sbin from ENV_SUPATH and ENV_PATH defined in /etc/login.defs because they are no longer necessary and only increase the length of $PATH.

#1041362#10
Date:
2023-08-04 11:28:01 UTC
From:
To:
patch attached
#1041362#17
Date:
2024-08-04 23:46:08 UTC
From:
To:
I agree we should do this, but earliest in forky.

util-linux might need to mirror the change.

Also we should figure out whats up with /usr/games.

Chris

#1041362#26
Date:
2025-02-17 10:29:41 UTC
From:
To:
Control: reassign -1 login.defs
Control: affects -1 openssh-server

Adding openssh, as the PATH set for remote logins is set by sshd.

login.defs currently has:

ENV_SUPATH     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV_PATH       PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

This is somewhat different from what openssh has in d/rules:

SUPERUSER_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DEFAULT_PATH := /usr/local/bin:/usr/bin:/bin:/usr/games

Looks like we should do some realignment on these values anyway.

Chris

#1041362#37
Date:
2025-05-07 10:05:34 UTC
From:
To:
To not repeat myself, I explained my reasons here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041357#17

Thanks.

#1041362#42
Date:
2025-05-07 10:33:45 UTC
From:
To:
* Santiago Vila <sanvila@debian.org> [250507 12:09]:

Noted, thanks.

I believe if things break because we drop /bin or /sbin, then these
are normal bugs that should be fixed.

Chris