Kwuser

kwuser resynchronizes user and group information with an NIS server.

Information about any particular user (and the groups they belong to) is automatically updated when the user logs in to the Klocwork Server through a Klocwork client. A user can log in to the Klocwork Server even if they were added to the NIS server after the last update of Klocwork user information.

Klocwork access control also updates automatically to synchronize with new NIS data when you restart the Klocwork Server.

You can force the Klocwork Server to reload all user and group data with the kwuser or kwuser reload command.

Usage

kwuser [--url http(s)://<host>:<port>]

where

  • <host>:<port> is the Klocwork Server host name (default: localhost) and port number (default: 8080)

While the update process is running, the Klocwork Server is available, and clients (kwadmin, Klocwork Static Code Analysis and Klocwork Code Review) can authenticate on the server.

Options

Name Short name Description
--help -H display this help and exit
--url http(s)://<klocwork_server_host>:<klocwork_server_port>/   URL for the Klocwork Server. Use https:// if a secure Klocwork Server connection has been configured.
  • <host> specifies the host machine running the Klocwork Server you want to connect to
  • <port> specifies the port used by the Klocwork Server you want to connect to
  • Use https:// if a secure Klocwork Server connection has been configured.
--verbose -v print verbose information about program execution, which can help to troubleshoot errors
--version -V display version and exit

Bulk loading user and groups (Basic authentication only)

If you are using basic authentication and have a large number of users and/or groups, you can use the command kwuser load-users or kwuser load-groups to load them all at once.

kwuser load-users

This command can be used to load users from a text file containing a list of user names. The file encoding should be UTF-8. Each line in the file should have the following format:

<username>;<password>

You can leave the <password> variable blank if no password exists for that user.

Example

user_1;user_1_password
user_2;
user_3;user_3_password
user_4

In the above example, user_2 and user_4 have empty passwords.

After the file has been created, you can use the kwuser load-users to load it. For example:

kwuser load-users C:\path\to\users\file.txt

kwuser load-groups

This command can be used to load groups from a text file containing a list of group names. The file encoding should be UTF-8. Each line in the file should have the following format:

<group_name>;<user1_name>;<user2_name>;<user3_name>

Example

group_a;user_1
group_b;user_1;user_2;user_3
group_c;
group_d

In the above example, 'group a' and 'group b' are created with specific users included; 'group c' and 'group d' are created without adding any users to them.

After the file has been created, you can use the kwuser load-groups to load it. For example:

kwuser load-groups C:\path\to\groups\file.txt