---
title: User Management
slug: aidc/Je_5-user-management
createdAt: 2025-12-29T10:34:02.761Z
---

## <font color="#1d50a2">URLs Summary</font>

| **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/&#x7B;name} | Y       | Y        | Y         | N       | Y          |

## <font color="#1d50a2">Examples</font>

### <font color="#1d50a2">Modify linux password policy.</font>

```json
PATCH HTTPS://{switch IP}/rest/v1/running/linux-password-policy
{
    "expiration-time": 66,
    "min-length":9,
    "enabled": "false"
}
```

### <font color="#1d50a2">Get all Linux users information.</font>

```json
GET HTTPS://{switch IP}/rest/v1/running/linux-user
```

### <font color="#1d50a2">Modify Linux user policy.</font>

```json
PATCH HTTPS://{switch IP}/rest/v1/running/linux-user-policy
{
    "enabled": "false",
    "retry-count": 3,
    "lock-time": 300,
    "session-hold-time":600
}
```

### <font color="#1d50a2">Create a linux user.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/linux-user/user
{
    "name": "test99",
    "password": "123456",
    "privilege-level": "config"
}
```

## <font color="#1d50a2">Properties Descriptions</font>

### <font color="#1d50a2">Linux user policy</font>

**Tree Diagrams**

```plaintext
  +--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.<br />Linux user policy.                                                                                            |
| enabled           | O            | "true"<br />"false" | (sub-property of linux-user-policy)<br />Linux user policy state, default is false.<br />Default value: "false"                                               |
| retry-count       | O            | 2..99               | (sub-property of linux-user-policy)<br />Maximum number of password attempts, default is 3<br />Default value: 3                                              |
| lock-time         | O            | 60..99999           | (sub-property of linux-user-policy)<br />The lockout time after the maximum number of incorrect passwords is reached, default is 300s<br />Default value: 300 |
| session-hold-time | O            | 0<br />60..99999    | (sub-property of linux-user-policy)<br />How long the terminal stays connected, default is 600s<br />Default value: 600                                       |

### <font color="#1d50a2">Linux users</font>

**Tree Diagrams**

```plaintext
  +--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.<br />Linux user.                                                  |
| user            | M            |                                                                | (sub-property of linux-user)<br />Path-only node, has no configurable value.<br />The list of user in linux. |
| name            | M            | a letter, followed by up to 31 letters, digits, or underscores | (sub-property of user)<br />Linux user name.                                                                 |
| password        | O            | string                                                         | (sub-property of user)<br />Linux user's password.                                                           |
| cipher-password | O            | string                                                         | (sub-property of user)<br />Linux user's cipher password.                                                    |
| privilege-level | O            | "none"<br />"show"<br />"config"<br />"sys\_admin"             | (sub-property of user)<br />Linux user privilege level.<br />Default value: "none"                           |

### <font color="#1d50a2">Linux passwork policy</font>

**Tree Diagrams**

```plaintext
  +--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.<br />Linux user password policy.                                                      |
| include-digit           | RO           | "true"<br />"false" | (sub-property of linux-password-policy)<br />Password should contain numbers.<br />Default value: "true"                         |
| include-lowercase       | RO           | "true"<br />"false" | (sub-property of linux-password-policy)<br />Password should contain lowercase letters.<br />Default value: "true"               |
| include-uppercase       | RO           | "true"<br />"false" | (sub-property of linux-password-policy)<br />Password should contain uppercase letters.<br />Default value: "true"               |
| include-special         | RO           | "true"<br />"false" | (sub-property of linux-password-policy)<br />Password should contain special letters.<br />Default value: "true"                 |
| expiration-time         | O            | 30..365             | (sub-property of linux-password-policy)<br />Password expiration days.<br />Default value: 180                                   |
| expiration-warning-time | RO           | 1..30               | (sub-property of linux-password-policy)<br />Prompt password expiration n days in advance.<br />Default value: 15                |
| history-password-count  | RO           | 1..100              | (sub-property of linux-password-policy)<br />Num of old password that the system will recorded.<br />Default value: 10           |
| min-length              | O            | 6..32               | (sub-property of linux-password-policy)<br />Minimum password length.<br />Default value: 8                                      |
| vague-hint              | RO           | "true"<br />"false" | (sub-property of linux-password-policy)<br />No prompt is given for username error or password error.<br />Default value: "true" |
| enabled                 | O            | "true"<br />"false" | (sub-property of linux-password-policy)<br />State of the feature.<br />Default value: "false"                                   |

