User Administration

The administration of the DataSync Suite is very user centric. As a result, almost all command line administration is contained within the user script, located at /opt/datasync-suite/bin/user

Actions

To see a list of the 'actions' available to the CLI utility, simply execute it without any arguments

Action Help

To view the help for a particular action, execute user with the help argument. This will prompt for the particular action to get help on.

Optionally the prompt can be bypassed with -a or --action. For example, the below command will show the help for the add action.

Bypassing prompts with option arguments

Every prompt associated with an action can be bypassed with an option argument. As an example, you may notice that the majority of actions prompt for a user's email address. This prompt can be bypassed by providing the -e or --email option followed by a value. Below is a simple example of bypassing the email prompt when viewing user details for bob.

Advanced prompt bypassing

Note that when using the modify or add actions, prompts for extension instance configuration can also be bypassed using a dotted --<extension name>.instance <instance name> syntax. To illustrate, below is a more complex example of modifying bob with the zimbrauser extension prompts bypassed.

For more information on bypassing arguments for specific actions see the help for the desired action.

Names of Extensions Currently Installed with Suite

CSV User Imports

Users can be added to the Suite using a csv file. To do this use the addfile option of user command. This can also be used to modify preexisting users.

$ ./user addfile -c <csv_file_path>

CSV File Format

The csv file must have as it's first line headers for the fields of the users to create.

The headers are:

email
The email address of the user to create, this will also be their login
username
The username of the user, if the user has sugar this will be their sugar username
lastname
The last name of the user to create.
password
The password to use for the user
firstname
The first name of the user
[extension name].instance

[extension name] is the name of the extension, example: zimbrauser. The values in this column are specific instance names. So if you create an instance of zimbrauser extension called zimbra1 then the value to use in this column would be zimbra1.

The following csv file creates 3 users, 2 of which have sugar and zimbra and one that only has zimbra.

email,username,firstname,lastname,password,sugar.instance,zimbrauser.instance
bob@example.org,smithb,Bob,Smith,secret,sugarexample,zimbra
jane@example.org,smithj,Jane,Smith,secret,sugarexample,zimbra
jake@example.org,jakesmith,Jake,Smith,secret,,zimbra


CategoryAdministration CategoryDocumentation

UserScript (last edited 2010-03-08 17:17:24 by DataSyncDev)