package/dash: add /etc/dash to /etc/shells
When dash is selected, /bin/dash is not added to /etc/shells (see man shells). So, login tools like dropbear reject the ssh connections for users using dash as shell in /etc/passwd. buildroot authpriv.warn dropbear[853]: User 'kubu' has invalid shell, rejected Signed-off-by: Romain Naour <romain.naour@smile.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
854e3dd1a0
commit
129f327698
@ -28,4 +28,12 @@ define DASH_INSTALL_TARGET_CMDS
|
|||||||
$(INSTALL) -m 0755 $(@D)/src/dash $(TARGET_DIR)/bin/dash
|
$(INSTALL) -m 0755 $(@D)/src/dash $(TARGET_DIR)/bin/dash
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# Add /bin/dash to /etc/shells otherwise some login tools like dropbear
|
||||||
|
# can reject the user connection. See man shells.
|
||||||
|
define DASH_ADD_DASH_TO_SHELLS
|
||||||
|
grep -qsE '^/bin/dash$$' $(TARGET_DIR)/etc/shells \
|
||||||
|
|| echo "/bin/dash" >> $(TARGET_DIR)/etc/shells
|
||||||
|
endef
|
||||||
|
DASH_TARGET_FINALIZE_HOOKS += DASH_ADD_DASH_TO_SHELLS
|
||||||
|
|
||||||
$(eval $(autotools-package))
|
$(eval $(autotools-package))
|
||||||
|
Loading…
Reference in New Issue
Block a user