Configure Groups With Rake Tasks

Rake tasks can be used to configure and manage IBM Aspera Shares users, groups, shares, and nodes from the command line. Rake tasks must be run from the Shares shell, as described in the following steps:
  1. Go to the shares folder:
    #cd /opt/aspera/shares/u/shares/bin
  2. Test that your rake tasks are working correctly.
    ./run rake -T

The following rake tasks create and delete groups, as well as add or delete users from a group.

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