All of lore.kernel.org
 help / color / mirror / Atom feed
From: ChenQi <Qi.Chen@windriver.com>
To: <yocto@yoctoproject.org>
Subject: Re: Setting Default User Accounts
Date: Thu, 21 Aug 2014 18:21:28 +0800	[thread overview]
Message-ID: <53F5C828.4090509@windriver.com> (raw)
In-Reply-To: <36A43B0E1E88D84791516F9D44BC48331B3C8D01@corpmail01.corp.sensis.com>

[-- Attachment #1: Type: text/plain, Size: 2299 bytes --]

How about add in local.conf:

INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "usermod -L root; \
                       useradd -P 'test' test;"

//Chen Qi

On 08/21/2014 03:13 AM, Crast, Nicholas wrote:
>
> All,
>
> I am currently in the middle of a battle with yocto, trying to 
> accomplish the following:
>
> 1.)Disable root user account
>
> 2.)Create default user account with default password
>
> I currently have the following a recipe:
>
> USERADD_PACKAGES = "${PN}"
>
> USERADD_PARAM_${PN} = "-d /home/nick -r -s /bin/bash nick "
>
> In order to try to add a user account. I have this in my image recipe:
>
> ROOTFS_POSTPROCESS_COMMAND += "set_nick_passwd;"
>
> set_nick_passwd() {
>
>    sed 's%^ nick:[^:]*:% nick:adySxRKMiPvjA:%' \
>
>        < ${IMAGE_ROOTFS}/etc/shadow \
>
>        > ${IMAGE_ROOTFS}/etc/shadow.new;
>
>    mv ${IMAGE_ROOTFS}/etc/shadow.new ${IMAGE_ROOTFS}/etc/shadow ;
>
> }
>
> This is to edit the /etc/shadow file and insert a new (hashed) 
> password. What I’m looking for is a cleaner way to do this. When I run 
> bitbake I get a lot of warnings because the “nick” account is already 
> an account on my build machine. This seems like a fairly common use 
> case, and I think I am likely going about it wrong.
>
> Does anybody have any advice?
>
> -Nick
>
> ----------------------------------------
>
> Nick Crast
>
> Associate Software Engineer
>
> Saab Sensis Corporation
>
> Phone: 315-445-5703
>
> Email: Nicholas.Crast@saabsensis.com 
> <mailto:Nicholas.Crast@saabsensis.com>
>
>
> /This message is intended only for the addressee and may contain 
> information that is company confidential or privileged. Any technical 
> data in this message may be exported only in accordance with the U.S. 
> International Traffic in Arms Regulations (22 CFR Parts 120-130) or 
> the Export Administration Regulations (15 CFR Parts 730-774). 
> Unauthorized use is strictly prohibited and may be unlawful. If you 
> are not the intended recipient, or the person responsible for 
> delivering to the intended recipient, you should not read, copy, 
> disclose or otherwise use this message. If you have received this 
> email in error, please delete it, and advise the sender immediately. /
>
>


[-- Attachment #2: Type: text/html, Size: 6909 bytes --]

  parent reply	other threads:[~2014-08-21 10:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 19:13 Setting Default User Accounts Crast, Nicholas
2014-08-20 20:19 ` Chris Tapp
2014-08-21 10:21 ` ChenQi [this message]
2014-08-21 12:32   ` Akash Bhatnagar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53F5C828.4090509@windriver.com \
    --to=qi.chen@windriver.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.