Bulk Import DS Users with Rake Tasks

To manage users in bulk, use the following command syntax:
asctl faspex:rake users:bulk_command -- -u user_files -p properties_file
The available commands are:
  • bulk_create: Create the users with the names specified in the user_file.
  • bulk_update: Update the users with the names specified in the user_file.
  • bulk_delete: Delete the users with the names specified in the user_file.
For more details on the options, see the table below.

Rake Task Options

Options (Short Form) Options (Long Form) Description
-u userfile

--user_file=
user_file

Path to the CSV file specifying attributes to be applied to individual users (required).

The user file should have a format like the following, with the information of each new user per line:

name,first_name,last_name,email,ad_objectguid
username1,firstname,lastname,email,"objectGUID"
username2,firstname,lastname,email,"objectGUID"
username3,firstname,lastname,email,"objectGUID"
The objectGUID is the DS Distinguished Name (DN).
Important: If you are importing from Active Directory, you must find the objectGUID attribute for a user and copy it in hexadecimal format. Edit the user and go to Properties > Attribute Editor > objectGUID. Edit the attribute, select hexadecimal format, and copy the whole string.

This string is different from the string displayed on the main page. Use this string instead of the one on the main page.

When entering the string into the CSV file, enter it as one string without spaces. For example, if the string is "E4 3F 8A 9D 32 5E D7 40 B8 DB EF B3 CA 0F 7B B8", enter it as "E43F8A9D325ED740B8DBEFB3CA0F7BB8".
-p propertyfile

--properties_file=
properties_file

Path to the CSV file specifying attributes to be applied to all users (required).

The properties file for adding local users to Faspex would look like this:

type,authorization_domain_id
DirectoryServiceUser,id_num
The authorization_domain_id can be found by going to Server > Authentication > Directory Services and editing the Directory Service. Look at the URL and find the ID number after "authorization_domains. For example, if the URL is https://198.51.100.24/aspera/faspex/admin/authorization_domains/1/edit, the ID number is "1"
-h --help Print out help information for this rake task.