Configure Groups With Rake Tasks
Use rake tasks to create, modify, and delete groups; to add users to groups; and to import SAML and LDAP groups.
Rake tasks must be run from the Shares shell, as described in the
following steps:
- Go to the shares folder:
# cd /opt/aspera/shares/u/shares/bin
- Test that your rake tasks are working correctly.
# ./run rake -T
Create Group
# ./run rake data:group:create -- --group_name group_name
For example:
# ./run rake data:group:create -- --group_name projectgroup1
Delete Group
# ./run rake data:group:delete -- --group_name group_name
For example:
# ./run rake data:group:delete -- --group_name projectgroup1
Add User to a Group
# ./run rake data:group:user:add -- --username username --group_name group_name
For example:
# ./run rake data:group:user:add -- --username johndoe --group_name projectgroup1
Add LDAP User to a Group
# ./run rake data:group:authorizable:user:add -- --username ldap_username --group_name group_name
For example:
# ./run rake data:group:authorizable:user:add -- --username johnldap --group_name projectgroup1
Remove User from a Group
# ./run rake data:group:user:remove -- --username username --group_name group_name
For example:
# ./run rake data:group:user:remove -- --username johndoe --group_name projectgroup1
Export a List of Groups
# ./run rake data:group:export -- --path /path/to/file
For example:
# ./run rake data:user:export -- --path /temp/groupexport.txt
Import Groups from a Text File
# ./run rake data:group:import -- --path /path/to/file
If the group already exists in Shares, the rake task does not add the group.
For example:
# ./run rake data:group:import -- --path /temp/projectgroups.txt
Where the projectgroups.txt file contains the following :
projectgroup1
projectgroup2
projectgroup3
projectgroup4
projectgroup5
projectgroup6
Create SAML Group
# ./run rake data:group:saml:create -- --group_name group_name
For example:
# ./run rake data:group:saml:create -- --group_name samlgroup1
Fetch Group Details from LDAP
# ./run rake data:group:ldap:fetch -- --group_name group_name
For example:
# ./run rake data:group:ldap:fetch -- --group_name samlgroup1
Delete LDAP Group
# ./run rake data:group:ldap:delete -- --group_name group_name
For example:
# ./run rake data:group:ldap:delete -- --group_name samlgroup1