All of lore.kernel.org
 help / color / mirror / Atom feed
* Setting root password
@ 2015-09-24 13:24 Andy Pont
  0 siblings, 0 replies; 11+ messages in thread
From: Andy Pont @ 2015-09-24 13:24 UTC (permalink / raw)
  To: yocto

Hello,

Looking around the web and reading the assorted documents it seems to be
that the defined way to set the root password is to remove "debug-tweaks"
from EXTRA_IMAGE_FEATURES and to add the following lines to local.conf:

require conf/distro/include/security_flags.inc
INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "usermod -P <encrypted_password> root;"

When I try to build core-image-minimal then the build fails with the
following:

| DEBUG: Executing shell function set_user_group
| NOTE: Performing usermod with [-R
XXXXX/build/tmp/work/intel_core2_32-poky-linux/core-image-minimal-initramfs/
1.0-r0/rootfs -P Hkw6rBJlcfhvM root] and 1 times of retry
| Server refused shutdown.  Remaining client fds: 2
| Client pids: 3878 16245
| Server will shut down after all clients exit.
| WARNING: usermod command did not succeed. Retrying...
| ERROR: Tried running usermod command 1 times without success, giving up
| WARNING:
XXXXX/build/tmp/work/intel_core2_32-poky-linux/core-image-minimal-initramfs/
1.0-r0/temp/run.set_user_group.3878:1 exit 1 from
|   exit 1
| DEBUG: Python function do_rootfs finished
| ERROR: Function failed: set_user_group (log file is located at
XXXXX/build/tmp/work/intel_core2_32-poky-linux/core-image-minimal-initramfs/
1.0-r0/temp/log.do_rootfs.3878)

Any ideas on how to make this work?

Thanks,

Andy.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Setting root password
@ 2013-10-11 14:35 Jack Mitchell
  2013-10-11 15:08 ` Koen Kooi
  2013-10-12  2:04 ` ChenQi
  0 siblings, 2 replies; 11+ messages in thread
From: Jack Mitchell @ 2013-10-11 14:35 UTC (permalink / raw)
  To: openembedded-core

What is the best way to set the root password for an image during build
time?

I have come across this snippet:

ROOTFS_POSTPROCESS_COMMAND += " \
        sed 's%^root:[^:]*:%root:${PASSWD}:%' \
        < ${IMAGE_ROOTFS}/etc/shadow \
        > ${IMAGE_ROOTFS}/etc/shadow.new;\
        mv ${IMAGE_ROOTFS}/etc/shadow.new ${IMAGE_ROOTFS}/etc/shadow ;"

but it feels a bit hacky... is there no defined way to do this cleanly?

Cheers,
Jack.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-09-29  9:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5603f9ce.e9d1440a.dc3ac.43adSMTPIN_ADDED_BROKEN@mx.google.com>
2015-09-24 13:45 ` Setting root password Daniel.
2015-09-24 13:59   ` Andy Pont
     [not found]   ` <560401bd.46256b0a.11836.2eefSMTPIN_ADDED_BROKEN@mx.google.com>
2015-09-24 14:16     ` Daniel.
2015-09-24 14:20       ` Daniel.
2015-09-24 15:17         ` Rudolf J Streif
2015-09-24 16:21           ` Andy Pont
2015-09-29  9:04           ` Paul Eggleton
2015-09-24 13:24 Andy Pont
  -- strict thread matches above, loose matches on Subject: below --
2013-10-11 14:35 Jack Mitchell
2013-10-11 15:08 ` Koen Kooi
2013-10-12  2:04 ` ChenQi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.