Working with Rake Tasks |
# cd /opt/aspera/shares/u/shares/bin
./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.
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
|
Command | Usage |
---|---|
Syntax | rake data:user:delete -- --username username |
Example | ./run rake data:user:delete -- --username johndoe
|
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
|
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.
|
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.
|
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
|
Command | Usage |
---|---|
Syntax |
rake data:group:ldap:fetch -- --username username |
Example |
./run rake data:group:ldap:fetch -- --user_name johndoe
|