system/Config.in: do not reference md5 for sha256 option
PATCH 1/2 system/Config.in: do not reference md5 for sha256 option
Commit bf3626002f ("system cfg: remove mkpasswd MD5 format option") dropped the MD5 option, so stop referring to it from the sha256 one to limit confusion.
--- system/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
system/Config.in +1 -1
@@ -67,7 +67,7 @@ choice config BR2_TARGET_GENERIC_PASSWD_SHA256 bool "sha-256" help - Use SHA256 to encode passwords which is stronger than MD5. + Use SHA256 to encode passwords. config BR2_TARGET_GENERIC_PASSWD_SHA512 bool "sha-512"
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/busybox: default to BR2_TARGET_GENERIC_PASSWD_* algo
Make busybox follow the BR2_TARGET_GENERIC_PASSWD_* system configuration option, E.G.
cat defconfig
BR2_x86_core2=y
BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_MUSL_BLEEDING_EDGE=y BR2_STATIC_LIBS=y BR2_TARGET_GENERIC_PASSWD_SHA512=y
./target/usr/bin/mkpasswd --help
BusyBox v1.37.0 (2026-01-27 17:31:51 CET) multi-call binary.
Usage: mkpasswd [-P FD] [-m TYPE] [-S SALT] [PASSWORD] [SALT]
Print crypt(3) hashed PASSWORD
-P N Read password from fd N
-m TYPE des,md5,sha256/512 (default sha512) -S SALT
./target/usr/bin/mkpasswd test $6$VQ6lDdGRJOgs8Exs$gEWp1nN/FHCAgmoB6lD.fN13EKA40yV7WQmZJcFp114VrL/st74zP5iPsLHi5NFX/A6GAa1gD.yqzp5Lz3DKl/
--- package/busybox/busybox.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+)
package/busybox/busybox.mk +13 -0
@@ -176,6 +176,18 @@ define BUSYBOX_SET_CRYPT_SHA endef endif +ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256),y) +define BUSYBOX_SET_DEFAULT_PASSWD_ALGO + $(call KCONFIG_SET_OPT,CONFIG_FEATURE_DEFAULT_PASSWD_ALGO,"sha256") +endef +endif + +ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA512),y) +define BUSYBOX_SET_DEFAULT_PASSWD_ALGO + $(call KCONFIG_SET_OPT,CONFIG_FEATURE_DEFAULT_PASSWD_ALGO,"sha512") +endef +endif + ifeq ($(BR2_USE_MMU),y) define BUSYBOX_SET_MMU $(call KCONFIG_DISABLE_OPT,CONFIG_NOMMU)
@@ -427,6 +439,7 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS $(BUSYBOX_SET_MDEV) $(BUSYBOX_SET_CRYPT_SHA) $(BUSYBOX_LINUX_PAM) + $(BUSYBOX_SET_DEFAULT_PASSWD_ALGO) $(BUSYBOX_SET_INIT) $(BUSYBOX_SET_WATCHDOG) $(BUSYBOX_SET_SELINUX)
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedRe: [Buildroot] [PATCH 2/2] package/busybox: default to BR2_TARGET_GENERIC_PASSWD_* algo
In reply of:
Quoted 17 lines
Make busybox follow the BR2_TARGET_GENERIC_PASSWD_* system configuration option, E.G.
cat defconfig
BR2_x86_core2=y
BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_MUSL_BLEEDING_EDGE=y BR2_STATIC_LIBS=y BR2_TARGET_GENERIC_PASSWD_SHA512=y./target/usr/bin/mkpasswd --help
BusyBox v1.37.0 (2026-01-27 17:31:51 CET) multi-call binary.Usage: mkpasswd [-P FD] [-m TYPE] [-S SALT] [PASSWORD] [SALT]
Print crypt(3) hashed PASSWORD
Quoted 8 lines
-P N Read password from fd N
-m TYPE des,md5,sha256/512 (default sha512) -S SALT./target/usr/bin/mkpasswd test $6$VQ6lDdGRJOgs8Exs$gEWp1nN/FHCAgmoB6lD.fN13EKA40yV7WQmZJcFp114VrL/st74zP5iPsLHi5NFX/A6GAa1gD.yqzp5Lz3DKl/
Signed-off-by Peter Korsgaard <[email protected]>
Applied to 2025.02.x & 2025.11.x. Thanks
Quoted 42 lines
--- package/busybox/busybox.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+)package/busybox/busybox.mk +13
-0@@ -176,6 +176,18 @@ define BUSYBOX_SET_CRYPT_SHA endef endif +ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256),y) +define BUSYBOX_SET_DEFAULT_PASSWD_ALGO + $(call KCONFIG_SET_OPT,CONFIG_FEATURE_DEFAULT_PASSWD_ALGO,"sha256") +endef +endif + +ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA512),y) +define BUSYBOX_SET_DEFAULT_PASSWD_ALGO + $(call KCONFIG_SET_OPT,CONFIG_FEATURE_DEFAULT_PASSWD_ALGO,"sha512") +endef +endif + ifeq ($(BR2_USE_MMU),y) define BUSYBOX_SET_MMU $(call KCONFIG_DISABLE_OPT,CONFIG_NOMMU)@@ -427,6 +439,7 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS $(BUSYBOX_SET_MDEV) $(BUSYBOX_SET_CRYPT_SHA) $(BUSYBOX_LINUX_PAM) + $(BUSYBOX_SET_DEFAULT_PASSWD_ALGO) $(BUSYBOX_SET_INIT) $(BUSYBOX_SET_WATCHDOG) $(BUSYBOX_SET_SELINUX)Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 5 lines · Peter Korsgaard
Commit
bf3626002f("system cfg: remove mkpasswd MD5 format option") dropped the MD5 option, so stop referring to it from the sha256 one to limit confusion.Signed-off-by Peter Korsgaard <[email protected]>
Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedIn reply of:
Quoted 5 lines
Commit
bf3626002f("system cfg: remove mkpasswd MD5 format option") dropped the MD5 option, so stop referring to it from the sha256 one to limit confusion.Signed-off-by Peter Korsgaard <[email protected]>
Applied to 2025.02.x & 2025.11.x. Thanks
Quoted 24 lines
--- system/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)system/Config.in +1
-1@@ -67,7 +67,7 @@ choice config BR2_TARGET_GENERIC_PASSWD_SHA256 bool "sha-256" help - Use SHA256 to encode passwords which is stronger than MD5. + Use SHA256 to encode passwords. config BR2_TARGET_GENERIC_PASSWD_SHA512 bool "sha-512"Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot