06-20-2019 04:13 PM - edited 06-20-2019 04:15 PM
I'm using Petalinux 2019.1 and trying to add a user. This recipe is within my own layer.
inherit extrausers EXTRA_USERS_PARAMS = " useradd elton;"
The log has this to say:
NOTE: Executing set_user_group ... DEBUG: Executing shell function set_user_group NOTE: petalinux-user-image: Performing usermod with [-R /home/kenny/Desktop/radio/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/rootfs -P root] Usage: usermod [options] LOGIN Options: -c, --comment COMMENT new value of the GECOS field -d, --home HOME_DIR new home directory for the user account -e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE -f, --inactive INACTIVE set password inactive after expiration to INACTIVE -g, --gid GROUP force use GROUP as new primary group -G, --groups GROUPS new list of supplementary GROUPS -a, --append append the user to the supplemental GROUPS mentioned by the -G option without removing the user from other groups -h, --help display this help message and exit -l, --login NEW_LOGIN new value of the login name -L, --lock lock the user account -m, --move-home move contents of the home directory to the new location (use only with -d) -o, --non-unique allow using duplicate (non-unique) UID -p, --password PASSWORD use encrypted password for the new password -P, --clear-password PASSWORD use clear password for the new password -R, --root CHROOT_DIR directory to chroot into -A, --prefix PREFIX_DIR prefix directory where are located the /etc/* files -s, --shell SHELL new login shell for the user account -u, --uid UID new UID for the user account -U, --unlock unlock the user account -v, --add-subuids FIRST-LAST add range of subordinate uids -V, --del-subuids FIRST-LAST remove range of subordinate uids -w, --add-subgids FIRST-LAST add range of subordinate gids -W, --del-subgids FIRST-LAST remove range of subordinate gids ERROR: petalinux-user-image: usermod command did not succeed. WARNING: /home/kenny/Desktop/radio/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/run.set_user_group.32415:1 exit 1 from 'exit 1' DEBUG: Python function do_rootfs finished ERROR: Function failed: set_user_group (log file is located at /home/kenny/Desktop/radio/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/log.do_rootfs.32415)
06-20-2019 09:26 PM
HI kenny@stealthspacecompany.com
Please refr this below link, hope this will help. I have not verified it, but looks based on comments it should work.
https://stackoverflow.com/questions/44043874/how-to-add-an-user-and-re-set-the-root-user-in-yocto
Let me know once you verify if this works or not.
THanks & regards
Aravind
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
06-21-2019 04:10 AM
06-21-2019 01:43 PM
I had read that post before and it is already what I am doing.
06-21-2019 01:44 PM - edited 06-21-2019 01:46 PM
The PDF is another paint-by-numbers solution and it is not terribly helpful to engineers. It's also more or less what I'm doing except that I've added a recipe to a layer I've defined.
06-21-2019 03:27 PM
Ok, sorry it didnt help. These are the steps I took to get this working on my end.
06-25-2019 02:08 AM
You'll get this output manually when no arguments are given to "usermod". My guess is your Petalinux "do_rootfs" command is doing the same. It is worth looking into that.