User management with the CLI command user
Last adaptation to the version: 12.6.0
New:
- Correction syntax user attribute otpsecret
Last updated:
09.2023
Example: user set id "10" groups [ ] (Note the spaces between the brackets!)
If multiple values are to be passed in one parameter, they must be enclosed in inverted commas and surrounded by square brackets with a space between them.
Example: user set id "10" groups [ "Group1" "Group2" "Group3" ]
Command | Parameter | Description | Example | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
useruser getuser get |
Displays all or individual users
|
Show all users: user get | |||||||||||||||
name | Optional. Name of the user account | Show user "user1" user get name "benutzer1" | |||||||||||||||
user newuser new |
Creates a new user | user new name "benutzer2" password "insecure" groups "ssl-user" | |||||||||||||||
name | Name of the user account | ||||||||||||||||
password | Password of the user account | ||||||||||||||||
groups | Group of the user account | ||||||||||||||||
user setuser set |
Changes user settings | user set id "183" groups vpn-user | |||||||||||||||
id | ID of the user account | ||||||||||||||||
name | Optional. Name of the user account | ||||||||||||||||
groups | Group of the user account | ||||||||||||||||
user deleteuser delete |
Deletes a user. One parameter sufficient. | user delete id "193" | |||||||||||||||
id | ID of the user account | ||||||||||||||||
name | Name of the user account | ||||||||||||||||
user checkuser check |
Checks whether a user is a member of a specific group | user check name "benutzer1" groups "vpn-user" | |||||||||||||||
name | Name of the user account | ||||||||||||||||
groups | Group of the user account | ||||||||||||||||
user checkotpuser checkotp |
Verify the OTP code from the token | user checkotp name "user1" code "1234562" | |||||||||||||||
name | Name of the user account | ||||||||||||||||
code | OTP code to be checked for validity | ||||||||||||||||
user whouser who |
– | Shows which user is connected and logged in | user who | ||||||||||||||
user attributeuser attribute getuser attribute get |
Displays the attributes of one or all users
|
user attribute get | |||||||||||||||
name | Optional. Name of the user account | user attribute get name "benutzer1" | |||||||||||||||
user attribute setuser attribute set |
Ändert die Attribute des Benutzers | user attribute set name "admin" attribute "password_change" value "1" | |||||||||||||||
user | Name of the user account | ||||||||||||||||
attribute | Displays the attributes of one or all users
| ||||||||||||||||
value | Attribute value | ||||||||||||||||
user attribute otpsecretuser attribute otpsecret |
Generates a new OTP shared secret code | user attribute otpsecret name "user1" spcli user attribute otpsecret name "user1"
| |||||||||||||||
user | Name of the user account | ||||||||||||||||
user captiveportaluser captiveportal getuser captiveportal get |
– | Listing of all Captive Portal user accounts | user captiveportal get | ||||||||||||||
user captiveportal newuser captiveportal new |
Creates a Captive Portal user account | user captiveportal new name "CP-User" password "InSecure" expirydate "24:00" | |||||||||||||||
name | Captive Portal user account name | ||||||||||||||||
password | Captive Portal user account password | ||||||||||||||||
expirydate | Expiration date | ||||||||||||||||
user captiveportal setuser captiveportal set |
Changing the password or expiration date of the Captive Portal user account. | Change password: user captiveportal set name "CP-User" password "CP-InSecure" Change expiration date: user captiveportal set name "CP-User" expirydate "12:00" | |||||||||||||||
name | Captive Portal user account name | ||||||||||||||||
password | Captive Portal user account password | ||||||||||||||||
expirydate | Expiration date | ||||||||||||||||
user captiveportal deleteuser captiveportal delete |
Deletes a Captive Portal user account | user captiveportal delete name "CP-User" | |||||||||||||||
name | Captive Portal user account name | ||||||||||||||||
user groupuser group getuser group get |
– | Displays the groups
|
user group get | ||||||||||||||
user group newuser group new |
Creates a new group | user group new name "proxy-user" permission "HTTP_PROXY" | |||||||||||||||
name | Name of the group | ||||||||||||||||
permission | Group authorization
| ||||||||||||||||
user group setuser group set |
Changes the settings of a group | user group set id "194" permission [ WEB_USER VPN_CLIENTLESS ] | |||||||||||||||
id | ID of the group | ||||||||||||||||
name | Optional. Name of the group | ||||||||||||||||
permission | Group authorization
| ||||||||||||||||
user group deleteuser group delete |
Deletes a group. One parameter sufficient. | user group delete id "194" | |||||||||||||||
id | ID of the group | ||||||||||||||||
name | Name of the group | ||||||||||||||||
user group attribute getuser group attribute get |
Shows the attributes of the groups
|
user group attribute get | |||||||||||||||
user group attribute setuser group attribute set |
Adds attributes to a group | user group attribute set name "Userinterface" attribute "openvpn_client_download" value "0" | |||||||||||||||
name | Name of the group | ||||||||||||||||
attribute | Attributes assigned to the group | ||||||||||||||||
value | Attribute value | ||||||||||||||||
user group attribute deleteuser group attribute delete |
Deletes an attribute of a group | user group attribute delete name "Userinterface" attribute "openvpn_client_download" | |||||||||||||||
name | Name of the group | ||||||||||||||||
attribute | Attributes assigned to the group
| ||||||||||||||||
user support newuser support new |
Creates a support user | user support new name "Support" password "InSecure" groups "User" expirydate "24:00" | |||||||||||||||
name | Name of the user account | ||||||||||||||||
password | Password of the user account | ||||||||||||||||
groups | Group of the user account | ||||||||||||||||
expirydate | Expiration date | ||||||||||||||||
flags | Optional. User account restrictions |