[git commit] adduser: default to /sbin/nologin as shell for system accounts

Denys Vlasenko vda.linux at googlemail.com
Mon Oct 12 10:34:42 UTC 2026


commit: https://git.busybox.net/busybox/commit/?id=2e57f66cbae45be72d8ada895dac25e6c1ccb67c
branch: https://git.busybox.net/busybox/log/?h=master

Signed-off-by: Sören Tempel <soeren+git at soeren-tempel.net>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 loginutils/adduser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/loginutils/adduser.c b/loginutils/adduser.c
index ac43feb48..66e91fa6d 100644
--- a/loginutils/adduser.c
+++ b/loginutils/adduser.c
@@ -235,7 +235,7 @@ int adduser_main(int argc UNUSED_PARAM, char **argv)
 			usegroup = "nogroup";
 		}
 		if (!(opts & OPT_SHELL)) {
-			pw.pw_shell = (char *) "/bin/false";
+			pw.pw_shell = (char *) "/sbin/nologin";
 		}
 	}
 	pw.pw_gid = usegroup ? xgroup2gid(usegroup) : -1; /* exits on failure */


More information about the busybox-cvs mailing list