cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
686 Views
Registered: ‎05-10-2019

Cannot Add User

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)

 

0 Kudos
6 Replies
Highlighted
Moderator
Moderator
666 Views
Registered: ‎02-07-2018

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.
----------------------------------------------------------------------------------------------

 

0 Kudos
Highlighted
Moderator
Moderator
652 Views
Registered: ‎09-12-2007

I have attached a PDF to show how to do this on the ZCU102 in Petalinux

0 Kudos
Highlighted
643 Views
Registered: ‎05-10-2019

I had read that post before and it is already what I am doing.

0 Kudos
Highlighted
642 Views
Registered: ‎05-10-2019

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.

0 Kudos
Highlighted
Moderator
Moderator
630 Views
Registered: ‎09-12-2007

Ok, sorry it didnt help. These are the steps I took to get this working on my end.

 

0 Kudos
Highlighted
Explorer
Explorer
598 Views
Registered: ‎09-28-2018

kenny@stealthspacecompany.com 

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. 

 

 

 

0 Kudos