On 1/15/20 6:17 PM, White, Daniel E. (GSFC-770.0)[NICS] via
FreeIPA-users wrote:
Adding multiple users to one group is documented, but the other way
around seems to be missing.
Is there a way to add one user to multiple groups with one command ?
Hi,
with the GUI you can navigate to your user, then click on User Groups
and Add. Then select multiple groups to be added to.
With the cli there is no such command. You can either call ipa
group-add-member for each group, or create a batch command (it is more
efficient as it's reusing the same connection for all the commands).
For instance create the file batch.json with:
{"method":"batch","params":[[
{"method":"group_add_member","params":[["group1"],{"user":"user1"}]},
{"method":"group_add_member","params":[["group2"],{"user":"user1"}]}
],{}],"id":1}
Then use curl to execute the batch command:
kinit admin
curl -H "Content-Type:application/json" \
-H "Accept:application/json" \
-H "Accept-Language:en" \
-H referer:https://`hostname`/ipa \
--negotiate -u : \
--cacert /etc/ipa/ca.crt \
-d @/tmp/batch.json -X POST \
https://`hostname`/ipa/json
flo
If not, I can deal with it.
_______________________________________________
FreeIPA-users mailing list -- freeipa-users(a)lists.fedorahosted.org
To unsubscribe send an email to freeipa-users-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/freeipa-users@lists.fedoraho...