Rake tasks for adding and removing users from groups on Shares

Rake tasks are scripts that allow you to retrieve, delete or update information on your Shares server using the command line. Rake tasks can perform actions on user accounts, shares and nodes. This article describes the rake tasks available for adding and removing users from groups in Shares. For more general information on Shares rake tasks see this article (Shares rake tasks).

Adding a user to a group

The general syntax for this rake task is the following:

Rake tasks must be run from within the appropriate location in the shares folder:
  • Linux Shares 1.8 and later: /opt/aspera/shares/u/shares/bin
  • Linux Shares earlier than 1.8: /opt/aspera/shares/u/shares
  • Windows: C:\Shares\www
Windows
rake data:group:user:add -- [options]

Shares 1.8+
./run rake data:group:user:add -- [options]

Shares earlier than 1.8
bundle exec rake data:group:user:add -- [options]

The available options are the following:

option description                                                                                      
--username The username (required).
--group_name The name of the group (required).

 

Example

To add the user janedoe to the group ProjectUsers, you would run the following command:

rake data:group:user:add -- --username janedoe --group_name ProjectUsers

Removing a user from a group

The general syntax for this rake task is the following:

Rake tasks must be run from within the appropriate location in the shares folder:
  • Linux Shares 1.8 and later: /opt/aspera/shares/u/shares/bin
  • Linux Shares earlier than 1.8: /opt/aspera/shares/u/shares
  • Windows: C:\Shares\www
Windows
rake data:group:user:remove -- [options]

Shares 1.8+
./run rake data:group:user:remove -- [options]

Shares earlier than 1.8
bundle exec rake data:group:user:remove -- [options]

The available options are the following:

option description                                                                                      
--username The username (required).
--group_name The name of the group (required).

 

Example

To remove the user janedoe from the group ProjectUsers, you would run the following command:

rake data:group:user:remove -- --username janedoe --group_name ProjectUsers
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk