Configure Users With Rake Tasks

Rake tasks can be used to configure and manage IBM Aspera Shares users, groups, shares, and nodes from the command line. To run a rake task, first do the following:
  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 cover how to create, modify and delete users as well as how to export and import users from .csv files.

Create User

Command Usage
Syntax
rake data:user:create -- --username username --password password 
 --email email_address --first_name first_name --last_name last_name
Example
./run rake data:user:create -- --username johndoe --password ********* 
  --email john@shares.example.com --first_name John --last_name Doe

Delete User

Command Usage
Syntax
rake data:user:delete -- --username username
Example
./run rake data:user:delete -- --username johndoe

Updating User

Command Usage
Syntax
rake data:user:update -- --username username --password password 
 --email email --first_name first_name --last_name last_name
Example
./run rake data:user:update -- --username johndoe --password ********* 
  --email john@shares.example.com --first_name John --last_name Doe

Export a List of Users

Command Usage
Syntax
rake data:user:export -- --path /path/to/file
Example
./run rake data:user:export -- --path /temp/users.csv
Note: Exporting does not write user passwords to the .csv file. You must add them manually if you want passwords in the exported .csv file.

Import Users (from .csv)

Command Usage
Syntax
rake data:user:import -- --path /path/to/file
Example
./run rake data:user:import -- --path /temp/users.csv
Note: The format of the .csv file should be, for each user:
Username, Email, First Name, Last Name, Password
Important: By default, users created by this rake command do not have the Login permission set. A Shares admin can set login permissions for these users one by one by going to Admin Users, selecting the user, clicking Edit Security, and selecting the Login permission. Users for whom no passwords are specified will be given a random password and must click the Forgot your username and password? link before logging in.

Create SAML User

Command Usage
Syntax
rake data:user:saml:create -- --username username 
 --email email --first_name first_name --last_name last_name
Example
./run rake data:user:saml:create -- --username samldoe 
  --email samldoe@shares.example.com --first_name Sam --last_name Doe

Fetch User Details from LDAP

Command Usage
Syntax
rake data:group:ldap:fetch -- --username username
Example
./run rake data:group:ldap:fetch -- --user_name johndoe