M.Ferru M.Ferru - 5 months ago 28
Linux Question

How to add user to a group without usermod?

Is it possible to add a user to a group without usermod?
I'm working on embedded Linux 3.14.52 and I don't have the usermod command line.
If it's not possible, how add this command to kernel with Buildroot?

Answer

The user<->group association is saved in the /etc/group file. Each line of the file is in the format:

group_name:password:GID:user_list

You can add users in the comma-separated user_list part. If you prefer to use some existing tool, you can consider gpasswd (if available).

I don't know how to help you for the kernel/buildroot question.