Rake tasks for importing Active Directory users and groups into 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 Active Directory users or groups to Shares. This allows you to use other user and group related rake tasks on these users.

For more general information on Shares rake tasks see this article (Shares rake tasks).

Note: This rake task is available in Shares 1.9.3 and later.

Importing an Active Directory user to Shares

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:user:ldap:fetch -- [options]

Shares 1.8+
./run rake data:user:ldap:fetch -- [options]

Shares earlier than 1.8
bundle exec rake data:user:ldap:fetch -- [options]

 

The available options are the following:

option description                                                                                      
--username The username of the Active Directory user (required).

 

Example

To add the Active Directory user janedoe to Shares, you would run the following command:

rake data:user:ldap:fetch -- --username janedoe

 

Importing an Active Directory group to Shares

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:ldap:fetch -- [options]

Shares 1.8+
./run rake data:group:ldap:fetch -- [options]

Shares earlier than 1.8
bundle exec rake data:group:ldap:fetch -- [options]

 

The available options are the following:

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

 

Example

To add the Active Directory group ProjectUsers to Shares you would run the following command:

rake rake data:group:ldap:fetch -- --group_name ProjectUsers
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk