0001-adduser-set-default-shell-with-sbin-nologin.patch 1.2 KB

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