User Administration Commands
You can use the command line to perform the following actions on user administration:
- Managing Departments, Users, or Roles in a CSV File
- Deleting User Data for Deleted Users
Details of data that can be managed using a CSV file are as follows:
- Organization
- Organization details
- Organization member data
- Users
- User profile
- Membership information data
- Role data by user
- Role
- Role details
- User data by role
Importing Departments, Users, and Roles from a CSV File
Use the command line to import departments, users, or roles from a CSV file.
Command
Organization | Command |
---|---|
Imports organization details | import_organization.csp |
Imports organization members | import_organization_user.csp |
Users | Command |
---|---|
Imports user profiles | import_user.csp |
Imports membership information data | import_user_organization.csp |
Imports role data by user | import_user_role.csp |
Role | Command |
---|---|
Imports role details | import_role.csp |
Imports user data by role | import_role_user.csp |
Parameters
Parameters | Required item | Description |
---|---|---|
localfile | Specify a path to the CSV file to import. The CSV file must have permissions to allow the users running the Web server to view the file. |
|
charset | Specify the character encoding of the CSV file to import. Youo can use the following character codes:
|
|
skip | Specify one of the following values:
|
|
old | Only applicable for importing user profile CSV files. Specify one of the following values:
|
Execution Example
Assuming the example setting below, the command usage is as follows:
- Data type: User profiles
- Character encoding: UTF-8
- Header row: Skip
On Windows:
.\grn.exe -C -q code\command\import_user.csp localfile=user.csv charset=UTF-8 skip=1
On Linux:
./grn.cgi -C -q code/command/import_user.csp localfile=user.csv charset=UTF-8 skip=1
Exporting Departments, Users, and Roles from a CSV File
Use the command line to export departments, users, or roles to a CSV file.
Command
Organization | Command |
---|---|
Exports organization details | export_organization.csp |
Exports organization members | export_organization_user.csp |
Users | Command |
---|---|
Exports user profiles | export_user.csp |
Export organization members | export_user_organization.csp |
Exports role data by user | export_user_role.csp |
Role | Command |
---|---|
Exports role details | export_role.csp |
Exports user data by role | export_role_user.csp |
Parameters
Parameters | Required item | Description |
---|---|---|
charset | Specify the character encoding of the CSV file to export. Youo can use the following character codes:
|
|
title | Specify one of the following values:
|
|
old | Only applicable for importing user profile CSV files. Specify one of the following values:
|
Execution Example
Assuming the example setting below, the command usage is as follows:
- Data type: User profiles
- Character encoding: UTF-8
- Header row: Exported item name
On Windows:
.\grn.exe -C -q code\command\export_user.csp charset=UTF-8 title=1 > user.csv
On Linux:
./grn.cgi -C -q code/command/export_user.csp charset=UTF-8 title=1 > user.csv
Deleting User Data for Deleted Users
Use the command line to delete user information, permissions, and notifications for users who have been deleted.
You can delete user data by specifying the target user.
Command
delete_user.csp
Parameters
Parameters | Required item | Description |
---|---|---|
login_name | The input type of this argument is a string (one line). Specify the login name of the user to delete data. Only users who have been deleted can be specified. |
|
help | Displays help for this command. |
Execution Example
Assuming the example setting below, the command usage is as follows:
- Login Name: sato
On Windows:
.\grn.exe -C -q code\command\delete_user.csp login_name=sato
On Linux:
./grn.cgi -C -q code/command/delete_user.csp login_name=sato