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

Bug#1120828: the BusyBox shell should be known to /etc/shells



Package: busybox
Version: 1:1.37.0-6
Severity: minor

The file /etc/shells is managed by debianutils on Debian and identifies shells that are installed on the system. The shells(5) Linux manual page (not Debian-specific) says
> /etc/shells is a text file which contains the full pathnames of valid login shells. This file is consulted by chsh(1) and available to be queried by other programs.

Therefore chsh can't be used to set one's shell to the BusyBox shell until the BusyBox shell arranges to be included in this registry of installed shells. Debian shell packages typically do this using a drop-in file; details are in /usr/share/doc/debianutils/README.shells which spells out the "/etc/shells micropolicy".

This subject is of interest to me in seeing the BusyBox shell used more widely; embedded devices based on Debian will almost surely have BusyBox installed anyway and it's a viable candidate for /bin/sh. (As far as I can tell the only way to change /bin/sh nowadays is with a dpkg diversion—formerly dash had a Debconf option for this that's now removed. It's for the sake of symmetry that the BusyBox shell should be acknowledged as a legitimate shell.)

-- System Information:
Debian Release: 13.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.48+deb13-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Attachment: signature.asc
Description: This is a digitally signed message part

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Reply to: