导入弱字典

命令功能

导入弱字典。

  • 导入及导出弱字典时系统对大小写不敏感,只会保存对应小写字符串,设置密码时也将无视大小写进行弱字典匹配。
  • 若要保留系统弱口令配置,请先导出系统弱口令后,在导出的弱口令文件上新增弱口令。
  • 每条弱口令规则建议不超过30个字符。

命令格式

操作类型:POST

URLhttps://device_ip/redfish/v1/Systems/SecurityService/Actions/SecurityService.PunyDictImport

请求头:

X-Auth-Token: auth_value
请求消息体:
{
    "FileName":FileName,
    "Password":password
}

请求参数

表1 参数说明

参数

是否必选

参数说明

取值

FileName

必选

导入弱字典的文件名。

字符串,长度为1~255,可由大小写字母(a~z、A~Z)、数字(0~9)、其他字符(_.-)组成且不含“..”,后缀必须为“.conf。

Password

必选

用户密码。

字符串,边缘管理系统用户对应的密码。长度为8~20字符。

使用指南

使用实例

请求样例:

POST https://10.10.10.10/redfish/v1/Systems/SecurityService/Actions/SecurityService.PunyDictImport

请求头:

X-Auth-Token: auth_value
请求消息体:
{
    "FileName":"import.conf",
    "Password":"password"
}
响应样例:
{
    "error": {
        "code": "Base.1.0.Success",
        "message": "Operation success. See ExtendedInfo for more information.",
        "@Message.ExtendedInfo": [
            {
                "@odata.type": "#MessageRegistry.v1_0_0.MessageRegistry",
                "Description": "Indicates that no error has occurred.",
                "Message": "Import puny dict successfully.",
                "Severity": "OK",
                "NumberOfArgs": null,
                "ParamTypes": null,
                "Resolution": "None"
            }
        ]
    }
}

响应码:202

输出说明

表2 操作输出说明

字段

类型

说明

code

字符串

指示消息注册表中特定消息ID的字符串。

message

字符串

与消息注册表中的消息对应的易读的消息。

@odata.type

字符串

消息资源的OData描述信息。

Description

字符串

消息资源的具体描述。

Message

字符串

消息资源的详细信息。

Severity

字符串

严重性。支持的严重级别包括:

  • OK
  • Warning
  • Critical

NumberOfArgs

数字

消息描述的参数个数。

ParamTypes

数组

参数类型列表。

Resolution

字符串

事件处理建议。