User, user groups, and command policies
-
Display the prompt as defined in the user's configuration.
-
Display the prompt as defined in the group configuration for the user’s group.
-
Display the prompt as defined in the system global configuration settings.
-
User configuration.
-
Group configuration for the user’s group.
-
Global system configuration settings.
20<sup>th</sup> CLI session, any attempt to log on to the GUI, CLI, or NITRO results in an error message ((ERROR: Connection limit to CFE exceeded).
Configure user accounts
-
add system user <username> [-externalAuth ( ENABLED | DISABLED )] [-promptString <string>] [-timeout <secs>] [-logging ( ENABLED | DISABLED )] [-maxsession <positive_integer>] -
show system user <userName>
> add system user johnd -promptString user-%u-at-%T
Enter password:
Confirm password:
> show system user johnd
user name: john
Timeout:900 Timeout Inherited From: Global
External Authentication: ENABLED
Logging: DISABLED
Maximum Client Sessions: 20
Configure a user account by using the NetScaler GUI
-
Navigate to System > User Administration > Users, and create the user.
-
In the details pane, click Add to create a system user.
-
In the Create System Group page, set the following parameters:
-
User Name. Name of the user group.
-
CLI Prompt. The prompt that you prefer to set for the CLI interface access.
-
Idle Session Timeout (secs). Set the time a user can be inactive before the session times out and closes.
-
Maximum sessions. Set the maximum number of sessions that a user can try. For a nsroot user, the max session parameter cannot be modified.
-
Enable Logging Privilege. Enable logging privilege for the user. The Enable Logging Privilege parameter collects external logs information using web logging or audit logging mechanism. If the parameter is enabled, the auditing client authenticates itself with NetScaler to collect logs.
-
Enable external Authentication. Select the option if you want to use an external authentication server for authenticating the user.
-
Allowed Management Interface. Select the NetScaler interfaces for which the user group is granted permission to access.
-
Command Policies. Bind command policies to the user group.
-
Partitions. Bind partitions to the user group.
-
-
Click Create and Close.
Configure user groups
To create a user group by using the command line interface
-
add system group <groupName> [-promptString <string>] [-timeout <secs>] -
show system group <groupName>
> add system group Managers -promptString Group-Managers-at-%h
Bind a user account to a group by using the CLI
-
bind system group <groupName> -userName <userName> -
show system group <groupName>
> bind system group Managers -userName user1
Configure a user group by using the NetScaler GUI
-
Navigate to System > User Administration > Groups, and create the user group.
-
In the details pane, click Add to create a system user group.
-
In the Create System Group page, set the following parameters:
-
Group Name. Name of the user group.
-
CLI Prompt. The prompt that you prefer to set for the CLI interface access.
-
Idle Session Timeout (secs). Set the time a user can be inactive before the session times out and closes.
-
Allowed Management Interface. Select the NetScaler interfaces for which the user group is granted permission to access.
-
Members. Add user accounts to the group.
-
Command Policies. Bind command policies to the user group.
-
Partitions. Bind partitions to the user group.
-
-
Click Create and Close.
Configure command policies
-
You cannot create global command policies. Command policies must be bound directly to the users and groups on the appliance.
-
Users or groups with no associated command policies are subject to the default (DENY-ALL) command policy, and are therefore unable to run any configuration commands until the proper command policies are bound to their accounts.
-
All users inherit the policies of the groups to which they belong.
-
You must assign a priority to a command policy when you bind it to a user account or group account. This enables the appliance to determine which policy has priority when two or more conflicting policies apply to the same user or group.
-
If you bind two different command policies of the same priority to a user account or group account, the policy that you bind first takes the highest priority.
-
The following commands are available by default to any user and are unaffected by any command you specify:
-
help, show CLI attribute, set CLI prompt, clear CLI prompt, show CLI prompt, alias, unalias, history, quit, exit, whoami, config, set CLI mode, unset CLI mode, and show CLI mode.
| Policy name | Allows |
|---|---|
| read-only | Read-only access to all show commands except show ns runningConfig, show ns ns.conf, and the show commands for the NetScaler command group. |
| operator | Read-only access and access to commands to enable and disable services and servers. |
| network | Full access, except to the set and unset SSL commands, show ns ns.conf, show ns runningConfig, and show gslb runningConfig commands. |
| sysadmin | [Included in NetScaler 12.0 and later] A sysadmin is lower than a superuser in terms of access allowed on the appliance. A sysadmin user can perform all NetScaler operations with the following exceptions: no access to the NetScaler shell, cannot perform user configurations, cannot perform partition configurations, and some other configurations as stated in the sysadmin command policy. |
| superuser | Full access. Same privileges as the nsroot user. |
Create custom command policies
-
When you use regular expressions to define commands that are affected by a command policy, you must enclose the commands in double quotation marks. For example, to create a command policy that includes all commands that begin with show, type the following:
-
"\^show .*$"
-
To create a command policy that includes all commands that begin with rm, type the following:
-
"\^rm .*$"
-
Regular expressions used in command policies are not case sensitive.
| Command specification | Matches these commands |
|---|---|
| "\^rm\s+.*$" | All remove actions, because all remove actions begin with the rm string, followed by a space and more parameters such as command groups, command object types, and arguments. |
| "\^show\s+.*$" | All show commands, because all show actions begin with the show string, followed by a space and more parameters such as command groups, command object types, and arguments. |
| "\^shell$" | The shell command alone, but not combined with any additional parameters such as command groups, command object types, and arguments. |
| "\^add\s+vserver\s+.*$" | All create virtual server actions, which consist of add virtual server command followed by a space and more parameters such as command groups, command object types, and arguments. |
| "\^add\s+(lb\s+vserver)\s+.*" | All create lb virtual server actions, which consist of the add lb virtual server command followed by a space and more parameters such as command groups, command object types, and arguments. |
-
add system cmdPolicy <policyname> <action> <cmdspec> -
show system cmdPolicy <policyName>
add system cmdPolicy USER-POLICY ALLOW (\ server\ )|(\ service(Group)*\ )|(\ vserver\ )|(\ policy\ )|(\ policylabel\ )|(\ limitIdentifier\ )|(\^show\ (?!(system|ns\ (ns.conf|runningConfig))))|(save)|(stat\ .*serv)
Configure a command policy by using the NetScaler GUI
-
Navigate to System > User Administration > Command Policies.
-
In the details pane, click Add to create a command policy.
-
In the Configure Command Policy page, set the following parameters:
-
Policy name
-
Action
-
Command Spec.
-
-
Click OK.
Bind command policies to user accounts and user groups
-
Command policies bound directly to users and the corresponding groups are evaluated according to a priority number. A command policy with a lower priority number is evaluated before one with a higher priority number. Therefore, any privileges the lower-numbered command policy explicitly grants or denies are not overridden by a higher-numbered command policy.
-
When two command policies, one bound to a user account and other to a group, have the same priority number, the command policy bound directly to the user account is evaluated first.
-
bind system user <userName> -policyName <policyName> <priority> -
show system user <userName>
> bind system user user1 -policyName read_all 1
Bind command policies to a user account by using the NetScaler GUI
-
bind system group <groupName> -policyName <policyName> <priority> -
show system group <groupName>
> bind system group Managers -policyName read_all 1
Bind command policies to a user group by using the NetScaler GUI
Example use case: Manage user accounts, user groups, and command policies in a manufacturing organization
-
John Doe. The IT manager. John must be able to see all parts of the NetScaler configuration but does not need to modify anything.
-
Maria Ramiez. The lead IT administrator. Maria must be able to see and modify all parts of the NetScaler configuration except for NetScaler commands (which local policy dictates must be performed while logged on as nsroot).
-
Michael Baldrock. The IT administrator in charge of load balancing. Michael must be able to see all parts of the NetScaler configuration, but must modify only the load balancing functions.
| Field | Value | Note |
|---|---|---|
| NetScaler host name | ns01.example.net | N/A |
| User accounts | johnd, mariar, and michaelb | John Doe, IT manager, Maria Ramirez, IT administrator and Michael Baldrock, IT administrator. |
| Groups | Managers and SysOps | All managers and all IT administrators. |
| Command Policies | read_all, modify_lb, and modify_all | Allow complete read-only access, Allow modify access to load balancing, and Allow complete modify access. |
Configure user accounts, groups, and command policies for a sample organization
-
Use the procedure described in Configuring User Accounts section to create user accounts johnd, mariar, and michaelb.
-
Use the procedure described in Configuring User Groups to create user groups Managers and SysOps, and then bind the users mariar and michaelb to the SysOps group and the user johnd to the Managers group.
-
Use the procedure described in Creating Custom Command Policies to create the following command policies:
-
read_all with action Allow and command spec
"(\^show\s+(?!system)(?!ns ns.conf)(?!ns runningConfig).*)|(\^stat.*)" -
modify_lb with action as Allow and the command spec
"\^set\s+lb\s+.*$" -
modify\_all with action as Allow and the command spec
"\^\S+\s+(?!system).*"
-
-
Use the procedure described in
to bind the read_all command policy to the SysOps group, with priority value 1.
-
Use the procedure described in
to bind the modify_lb command policy to user michaelb, with priority value 5.
-
John Doe, the IT manager, has read-only access to the entire NetScaler configuration, but he cannot make modifications.
-
Maria Ramirez, the IT lead, has near-complete access to all areas of the NetScaler configuration, having to log on only to perform NetScaler-level commands.
-
Michael Baldrock, the IT administrator responsible for load balancing, has read-only access to the NetScaler configuration, and can modify the configuration options for load balancing.