The following rake tasks cover how to create, modify and delete users as well as how to
export and import users from .csv files.
Tip: Square brackets in
usage statements denote optional arguments and need not be included when running the
commands.
Note: Linux users must navigate to /opt/aspera/shares/u/shares/bin/ in the Terminal before running rake
tasks.
Create User
Command |
Usage |
Syntax |
rake data:user:create -- --username <username> --password <password>
--email <email> --first_name <first_name> --last_name <last_name>
|
Example |
././run rake data:user:create -- --username user --password 3x@mp13_p@zzw0rd
--email user@asperasoft.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 user
|
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 user --password 3x@mp13_p@zzw0rd
--email user@asperasoft.com --first_name John --last_name Doe
|
Export a List of Users
Command |
Usage |
Syntax |
rake data:user:export --path <path>
|
Example |
./run rake data:user:export --path /tmp
Note: Exporting will 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>
|
Example |
./run rake data:user:import -- --path /tmp/users.csv
Note: The format of the .csv file should be, for each user:
Username, Email, First Name, Last Name, Password
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.
|