Bug 1889 - useradd.bbclass failed to create home directory for new user
Summary: useradd.bbclass failed to create home directory for new user
Status: VERIFIED DUPLICATE of bug 2127
Alias: None
Product: Installation
Classification: Runtime
Component: Installation (show other bugs)
Version: 1.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.2 M4
Assignee: Scott Garman
QA Contact:
URL:
Whiteboard: fixed.
Depends on:
Blocks: 1818
  Show dependency tree
 
Reported: 2012-01-10 18:06 UTC by Edwin Zhai
Modified: 2012-03-30 05:16 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edwin Zhai 2012-01-10 18:06:17 UTC
We find this bug when fighting bug 1818. 

Rootless X need create a new user "xuser" in xserver-nodem-init.bb:
USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = "--create-home \
                       --groups video,tty,audio \
                       --user-group xuser"

But the issue is we have no "/home/xuser" created in final disk image, so that rootless X start failed.

I have tried to use "-d /home/xuser", but same failure.
Comment 1 Edwin Zhai 2012-01-10 18:10:31 UTC
To reproduce it, just build a core-image-sato for atom-pc(or get it from autobuilder), then append "psplash=false" to the syslinux.cfg, and boot with rootless X failed.


You can check the /home, there is only root directory there.
Comment 2 Joshua Lock - Disabled 2012-02-21 11:43:27 UTC
As a hunch I'd guess that the home directory is created but that it's not packaged and therefore not installed.

One possible solution would be to have the useradd class add a postinst to create the home directory if it doesn't already exist?
Comment 3 Jessica 2012-03-08 20:34:21 UTC
Paul, 

During the bug triage, RP mentioned that you've done some work in this area recently, so can you look at the bug context and make some comments? thx
Comment 4 Paul Eggleton 2012-03-12 10:11:36 UTC
I have been able to ascertain that at least when I'm running into this, it's not a packaging issue - useradd is run at rootfs creation time. Also, the correct option (--create-home) is being passed, so apparently it is being ignored.
Comment 5 Scott Garman 2012-03-29 20:38:40 UTC
I'm nearly certain this bug is a duplicate of bug #2127, which is now fixed. I cannot reproduce the problem. Please re-open if this is encountered again, and attach a log of the do_rootfs step.
Comment 6 Scott Garman 2012-03-29 20:39:06 UTC
Marking as resolved dupe.

*** This bug has been marked as a duplicate of bug 2127 ***
Comment 7 Edwin Zhai 2012-03-30 05:14:50 UTC
Have tested latest atom image @ http://autobuilder.pokylinux.org/nightly/20120328-1/machines/atom-pc/core-image-sato-atom-pc.hddimg

xuser's home directory can be created successfully, and rootless X start well.