IN THIS ARTICLE:
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 creating and deleting users. For more general information on Shares rake tasks see this article (Shares rake tasks).
Creating a user
You can create a user account for logging in to Shares with a rake task.
The syntax for the rake task is the following:
- 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:create -- [options]
Shares 1.8+
./run rake data:user:create -- [options]
Shares earlier than 1.8
bundle exec rake data:user:create -- [options]
The available options are the following:
option | description |
--username | The username of the new account (required). |
--password | The password (required). |
The user's email (required). | |
--first_name | The user’s first name. |
--last_name | The user’s last name. |
Example
To create user janedoe with password secret123, email janed@example.com, first name Jane and last name Doe, you would use the following:
rake data:user:create -- --username janedoe --password secret123 --email janed@example.com --first_name Jane
--last_name Doe
Deleting a user
You can delete a user account for logging in to Shares with a rake task.
The syntax for the rake task is the following:
- 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:delete -- [options]
Shares 1.8+
./run rake data:user:delete -- [options]
Shares earlier than 1.8
bundle exec rake data:user:delete -- [options]
The available options are the following:
option | description |
--username | The username of the new account (required). |
Example
To delete user sblack, you would use the following:
rake data:user:delete -- --username sblack
0 Comments