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.cr...@saabsensis.com<mailto:nicholas.cr...@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.
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to