Rake tasks for creating and deleting users on Shares

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:

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: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).
--email 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:

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: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
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk