1From 75e949bf80bf5e3e5bd8f81b258095e662b705c4 Mon Sep 17 00:00:00 2001 2From: Kai Kang <kai.kang@windriver.com> 3Date: Thu, 9 Jan 2020 13:51:28 +0800 4Subject: [PATCH] adduser: set default shell with /sbin/nologin 5 6Shell nologin whether provided by shadow or util-linux is installed to 7/sbin/nologin in oe-core. But the default shell of adduser is 8/usr/sbin/nologin and will fail to create a new user. 9 10Set the default shell with /sbin/nologin to fix the issue. 11 12Upstream-Status: Inappropriate [OE specific] 13 14Signed-off-by: Kai Kang <kai.kang@windriver.com> 15--- 16 adduser | 2 +- 17 1 file changed, 1 insertion(+), 1 deletion(-) 18 19diff --git a/adduser b/adduser 20index 0f24cc9..ab554d0 100755 21--- a/adduser 22+++ b/adduser 23@@ -431,7 +431,7 @@ if ($action eq "addsysuser") { 24 printf gtx("Adding new user `%s' (UID %d) with group `%s' ...\n"),$new_name,$new_uid,$ingroup_name 25 if $verbose; 26 $home_dir = $special_home || &homedir($new_name, $ingroup_name); 27- $shell = $special_shell || '/usr/sbin/nologin'; 28+ $shell = $special_shell || '/sbin/nologin'; 29 $undouser = $new_name; 30 my $useradd = &which('useradd'); 31 &systemcall($useradd, '-d', $home_dir, '-g', $ingroup_name, '-s', 32-- 332.17.1 34 35