User Management
| URL | GET | POST | PATCH | PUT | DELETE |
|---|---|---|---|---|---|
| /rest/v1/running/linux-password-policy | Y | N | Y | N | N |
| /rest/v1/running/linux-user | Y | N | Y | N | N |
| /rest/v1/running/linux-user-policy | Y | N | Y | N | N |
| /rest/v1/running/linux-user/user/{name} | Y | Y | Y | N | Y |
Examples
Section titled “Examples”Modify linux password policy.
Section titled “Modify linux password policy.”PATCH HTTPS://{switch IP}/rest/v1/running/linux-password-policy{ "expiration-time": 66, "min-length":9, "enabled": "false"}Get all Linux users information.
Section titled “Get all Linux users information.”GET HTTPS://{switch IP}/rest/v1/running/linux-userModify Linux user policy.
Section titled “Modify Linux user policy.”PATCH HTTPS://{switch IP}/rest/v1/running/linux-user-policy{ "enabled": "false", "retry-count": 3, "lock-time": 300, "session-hold-time":600}Create a linux user.
Section titled “Create a linux user.”POST HTTPS://{switch IP}/rest/v1/running/linux-user/user{ "name": "test99", "password": "123456", "privilege-level": "config"}Properties Descriptions
Section titled “Properties Descriptions”Linux user policy
Section titled “Linux user policy”Tree Diagrams
+--rw linux-user-policy | +--rw enabled? | +--rw retry-count? | +--rw lock-time? | +--rw session-hold-time?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| linux-user-policy | M | Path-only node, has no configurable value. | |
| Linux user policy. | |||
| enabled | O | ”true" | |
| "false” | (sub-property of linux-user-policy) | ||
| Linux user policy state, default is false. | |||
| Default value: “false” | |||
| retry-count | O | 2..99 | (sub-property of linux-user-policy) |
| Maximum number of password attempts, default is 3 | |||
| Default value: 3 | |||
| lock-time | O | 60..99999 | (sub-property of linux-user-policy) |
| The lockout time after the maximum number of incorrect passwords is reached, default is 300s | |||
| Default value: 300 | |||
| session-hold-time | O | 0 | |
| 60..99999 | (sub-property of linux-user-policy) | ||
| How long the terminal stays connected, default is 600s | |||
| Default value: 600 |
Linux users
Section titled “Linux users”Tree Diagrams
+--rw linux-user | +--rw user* [name] | +--rw name | +--rw password? | +--rw cipher-password? | +--rw privilege-level?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| linux-user | M | Path-only node, has no configurable value. | |
| Linux user. | |||
| user | M | (sub-property of linux-user) | |
| Path-only node, has no configurable value. | |||
| The list of user in linux. | |||
| name | M | a letter, followed by up to 31 letters, digits, or underscores | (sub-property of user) |
| Linux user name. | |||
| password | O | string | (sub-property of user) |
| Linux user’s password. | |||
| cipher-password | O | string | (sub-property of user) |
| Linux user’s cipher password. | |||
| privilege-level | O | ”none" | |
| "show" | |||
| "config" | |||
| "sys_admin” | (sub-property of user) | ||
| Linux user privilege level. | |||
| Default value: “none” |
Linux passwork policy
Section titled “Linux passwork policy”Tree Diagrams
+--rw linux-password-policy +--ro include-digit? +--ro include-lowercase? +--ro include-uppercase? +--ro include-special? +--rw expiration-time? +--ro expiration-warning-time? +--ro history-password-count? +--rw min-length? +--ro vague-hint? +--rw enabled?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| linux-password-policy | M | Path-only node, has no configurable value. | |
| Linux user password policy. | |||
| include-digit | RO | ”true" | |
| "false” | (sub-property of linux-password-policy) | ||
| Password should contain numbers. | |||
| Default value: “true” | |||
| include-lowercase | RO | ”true" | |
| "false” | (sub-property of linux-password-policy) | ||
| Password should contain lowercase letters. | |||
| Default value: “true” | |||
| include-uppercase | RO | ”true" | |
| "false” | (sub-property of linux-password-policy) | ||
| Password should contain uppercase letters. | |||
| Default value: “true” | |||
| include-special | RO | ”true" | |
| "false” | (sub-property of linux-password-policy) | ||
| Password should contain special letters. | |||
| Default value: “true” | |||
| expiration-time | O | 30..365 | (sub-property of linux-password-policy) |
| Password expiration days. | |||
| Default value: 180 | |||
| expiration-warning-time | RO | 1..30 | (sub-property of linux-password-policy) |
| Prompt password expiration n days in advance. | |||
| Default value: 15 | |||
| history-password-count | RO | 1..100 | (sub-property of linux-password-policy) |
| Num of old password that the system will recorded. | |||
| Default value: 10 | |||
| min-length | O | 6..32 | (sub-property of linux-password-policy) |
| Minimum password length. | |||
| Default value: 8 | |||
| vague-hint | RO | ”true" | |
| "false” | (sub-property of linux-password-policy) | ||
| No prompt is given for username error or password error. | |||
| Default value: “true” | |||
| enabled | O | ”true" | |
| "false” | (sub-property of linux-password-policy) | ||
| State of the feature. | |||
| Default value: “false” |