* [PATCH 0/2] Fix the problem of being unable to login in rescue mode if password is set
@ 2014-09-09 3:01 Chen Qi
2014-09-09 3:01 ` [PATCH 1/2] util-linux: split out util-linux-sulogin Chen Qi
2014-09-09 3:01 ` [PATCH 2/2] extrausers: add util-linux-sulogin to IMAGE_INSTALL Chen Qi
0 siblings, 2 replies; 5+ messages in thread
From: Chen Qi @ 2014-09-09 3:01 UTC (permalink / raw)
To: openembedded-core
To reproduce the problem:
1. Add in local.conf:
INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "usermod -P 'root' root; \
useradd -P 'test' test;"
2. bitbake core-image-minimal
3. runqemu qemux86 nographic bootparams="-s"
The following changes since commit 4c0a9ccbad2889b27b4b1d2ab91215a4bdcca3ce:
python-numpy: Fix build for mips64 (2014-09-01 18:00:32 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib ChenQi/sulogin-shadow
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/sulogin-shadow
Chen Qi (2):
util-linux: split out util-linux-sulogin
extrausers: add util-linux-sulogin to IMAGE_INSTALL
meta/classes/extrausers.bbclass | 2 +-
meta/recipes-core/util-linux/util-linux.inc | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] util-linux: split out util-linux-sulogin
2014-09-09 3:01 [PATCH 0/2] Fix the problem of being unable to login in rescue mode if password is set Chen Qi
@ 2014-09-09 3:01 ` Chen Qi
2014-09-09 3:01 ` [PATCH 2/2] extrausers: add util-linux-sulogin to IMAGE_INSTALL Chen Qi
1 sibling, 0 replies; 5+ messages in thread
From: Chen Qi @ 2014-09-09 3:01 UTC (permalink / raw)
To: openembedded-core
Split out a new package, util-linux-sulogin.
This package is needed because busybox's sulogin cannot handle shadow
files if FEATURE_SHADOWPASSWORDS is not enabled.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/util-linux/util-linux.inc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index ffb84c4..1460498 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -37,7 +37,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
util-linux-mkfs util-linux-mcookie util-linux-reset \
util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \
util-linux-partx ${PN}-bash-completion util-linux-hwclock \
- util-linux-findfs"
+ util-linux-findfs util-linux-sulogin"
SHARED_EXTRA_OECONF = "--disable-use-tty-group \
--disable-makeinstall-chown \
@@ -93,6 +93,7 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs"
FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
+FILES_util-linux-sulogin = "${base_sbindir}/sulogin*"
# Util-linux' blkid replaces the e2fsprogs one
FILES_util-linux-blkid = "${base_sbindir}/blkid*"
@@ -169,7 +170,7 @@ ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root"
ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject getopt sulogin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject getopt"
ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -180,7 +181,6 @@ ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix"
ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
-ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
ALTERNATIVE_TARGET[getopt] = "${bindir}/getopt"
ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1 reset.1"
@@ -233,6 +233,9 @@ ALTERNATIVE_util-linux-reset = "reset"
ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
+ALTERNATIVE_util-linux-sulogin = "sulogin"
+ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
+
BBCLASSEXTEND = "native nativesdk"
python do_package_prepend () {
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] extrausers: add util-linux-sulogin to IMAGE_INSTALL
2014-09-09 3:01 [PATCH 0/2] Fix the problem of being unable to login in rescue mode if password is set Chen Qi
2014-09-09 3:01 ` [PATCH 1/2] util-linux: split out util-linux-sulogin Chen Qi
@ 2014-09-09 3:01 ` Chen Qi
2014-09-14 22:51 ` Burton, Ross
1 sibling, 1 reply; 5+ messages in thread
From: Chen Qi @ 2014-09-09 3:01 UTC (permalink / raw)
To: openembedded-core
Previously, root with password set cannot login in rescue mode for
core-image-minimal. This is because that the busybox's sulogin is
not configured with FEATURE_SHADOWPASSWORDS enabled.
Add util-linux-sulogin in IMAGE_INSTALL_append properly to fix this problem.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/meta/classes/extrausers.bbclass b/meta/classes/extrausers.bbclass
index faf57b1..e9f4a25 100644
--- a/meta/classes/extrausers.bbclass
+++ b/meta/classes/extrausers.bbclass
@@ -15,7 +15,7 @@
inherit useradd_base
-IMAGE_INSTALL_append = " ${@['', 'base-passwd shadow'][bool(d.getVar('EXTRA_USERS_PARAMS', True))]}"
+IMAGE_INSTALL_append = " ${@['', 'base-passwd shadow util-linux-sulogin'][bool(d.getVar('EXTRA_USERS_PARAMS', True))]}"
# Image level user / group settings
ROOTFS_POSTPROCESS_COMMAND_append = " set_user_group;"
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] extrausers: add util-linux-sulogin to IMAGE_INSTALL
2014-09-09 3:01 ` [PATCH 2/2] extrausers: add util-linux-sulogin to IMAGE_INSTALL Chen Qi
@ 2014-09-14 22:51 ` Burton, Ross
2014-09-15 1:47 ` ChenQi
0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2014-09-14 22:51 UTC (permalink / raw)
To: Chen Qi; +Cc: OE-core
On 9 September 2014 04:01, Chen Qi <Qi.Chen@windriver.com> wrote:
> Previously, root with password set cannot login in rescue mode for
> core-image-minimal. This is because that the busybox's sulogin is
> not configured with FEATURE_SHADOWPASSWORDS enabled.
>
> Add util-linux-sulogin in IMAGE_INSTALL_append properly to fix this problem.
What's the rationale for installing bits of coreutils, verses enabling
FEATURE_SHADOWPASSWORDS in busybox?
Ross
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] extrausers: add util-linux-sulogin to IMAGE_INSTALL
2014-09-14 22:51 ` Burton, Ross
@ 2014-09-15 1:47 ` ChenQi
0 siblings, 0 replies; 5+ messages in thread
From: ChenQi @ 2014-09-15 1:47 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 09/15/2014 06:51 AM, Burton, Ross wrote:
> On 9 September 2014 04:01, Chen Qi <Qi.Chen@windriver.com> wrote:
>> Previously, root with password set cannot login in rescue mode for
>> core-image-minimal. This is because that the busybox's sulogin is
>> not configured with FEATURE_SHADOWPASSWORDS enabled.
>>
>> Add util-linux-sulogin in IMAGE_INSTALL_append properly to fix this problem.
> What's the rationale for installing bits of coreutils, verses enabling
> FEATURE_SHADOWPASSWORDS in busybox?
>
> Ross
>
>
If FEATURE_SHADOWPASSWORDS is enabled in busybox, busybox assumes that
there's /etc/shadow in the system, but it's possible that there isn't.
In such case, the related utilities from busybox cannot work correctly.
That's why I chose to installed util-linux-sulogin conditionally in
extrausers.bbclass instead of enabling FEATRUE_SHADOWPASSWORDS in the
defconfig of busybox.
Best Regards,
Chen Qi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-15 1:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-09 3:01 [PATCH 0/2] Fix the problem of being unable to login in rescue mode if password is set Chen Qi
2014-09-09 3:01 ` [PATCH 1/2] util-linux: split out util-linux-sulogin Chen Qi
2014-09-09 3:01 ` [PATCH 2/2] extrausers: add util-linux-sulogin to IMAGE_INSTALL Chen Qi
2014-09-14 22:51 ` Burton, Ross
2014-09-15 1:47 ` ChenQi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox