How to add extra user to group

Hi,

I already use groupadd command to create a new group.

sudo groupadd --extrausers test_g

but how to add a extra user to this group? thanks.

i fear you have to edit /var/lib/extrauser/group manually currently to add the user to that group…

Is adduser included in Core devices? If it is then we could try:

sudo adduser --extrausers $user $group

I haven’t tested whether this actually works though, so please be kind if I’m way off base :-p

not sure it works like this (last time i checked, adduser didnt support additional groups with the extrausers setting) … but yes if it would work, you could indeed use it on development images …

but that wont help with production, there is no way beyond manually via ssh login to call adduser, the only properly usable interface for adding a user to core is via snapd and its snap create-user command or via system-user assertions …

also note that core is by design not really created for multi-user setups.