Reputation: 99
I am cross-compiling target RFS from a makefile which is executing on a host machine? Is there any specific usage of groupadd command that i should know? Also do I need to use groupadd from host linux machine or the target's embedded version of groupadd? How to specify within groupadd command to add group in the target RFS and not in the host machine. I am new to this.
example :
/usr/sbin/groupadd -g 1111 test_gp
I need to create 1111 inside a specific path where rfs is getting compiled,say /home/arm_build/rfs/
and then add a user under it
/usr/sbin/useradd -g test_gp -m -d /home/test_gp -p l.cjpassword -s /bin/bash -c "A test group" test_gp
what will be the equivalent command as I see there is no option to provide path in groupadd it just takes a number as gid
Upvotes: 1
Views: 974
Reputation: 1661
You have many options:
/etc/group
is nothing but a text file,
so you can create it manually or from your own scriptsgroupadd --root <DIR>
will modify files under
<DIR>
, so you can point it to the directory where you are building your
root filesystemUpvotes: 1