Your message dated Wed, 3 Sep 2025 19:39:58 +0200
with message-id <aLh9bgnGLP-ttxqI@nuc>
and subject line Re: /etc/profile requires implicit PATH set before setting it
has caused the Debian Bug report #1086843,
regarding /etc/profile requires implicit PATH set before setting it
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1086843: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1086843
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: base-files
Version: 12.4+deb12u8
Severity: normal
X-Debbugs-Cc: [email protected]
Hi,
reproducer for the problem:
$ mkdir tmp
$ sudo debootstrap bookworm tmp/
[...]
$ sudo PATH=not-set-correctly /usr/sbin/chroot tmp/ /bin/bash -l
bash: id: command not found
bash: [: : integer expression expected
PATH is taken from the parent shell, and that's sometimes undefined or
doesn't include /usr/bin/.
As such, the line 4 in /etc/profile should be changed from
if [ "$(id -u)" -eq 0 ]; then
to
if [ "$(/usr/bin/id -u)" -eq 0 ]; then
Thanks in advance!
Greets,
Lee
-- System Information:
Debian Release: 12.8
APT prefers stable-updates
APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990,
'proposed-updates'), (990, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.10.11+bpo-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages base-files depends on:
ii gawk [awk] 1:5.2.1-2
ii mawk [awk] 1.3.4.20200120-3.1
base-files recommends no packages.
base-files suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Wed, Nov 06, 2024 at 03:42:56PM +0100, Lee Garrett wrote:
> Package: base-files
> Version: 12.4+deb12u8
> Severity: normal
> X-Debbugs-Cc: [email protected]
>
> Hi,
>
> reproducer for the problem:
>
> $ mkdir tmp
> $ sudo debootstrap bookworm tmp/
> [...]
> $ sudo PATH=not-set-correctly /usr/sbin/chroot tmp/ /bin/bash -l
> bash: id: command not found
> bash: [: : integer expression expected
>
> PATH is taken from the parent shell, and that's sometimes undefined or
> doesn't include /usr/bin/.
Hello. Given that some distributions (for example, Ubuntu) do not have
any PATH at all in /etc/profile, I consider reasonable to assume that
by the time /etc/profile is read, PATH contains /usr/bin at least.
So, if PATH is undefined or does not include /usr/bin, it's probably a
symptom that there is something wrong somewhere. Modifying /etc/profile
as suggested would just hide the problem and make the file more
complex without a real need.
Thanks.
--- End Message ---