跳转到主内容

如何通过命令行编辑 Unified Manager 集群数据源的凭据?

Views:
851
Visibility:
Public
Votes:
0
Category:
active-iq-unified-manager
Specialty:
om
Last Updated:

适用于

  • Active IQ Unified Manager (AIQUM) 9.6+
  • 所有 OS 平台

回答

对于 Unified Manager OVA 安装,您首先需要获得对命令行的“diag”访问权限。请参阅以下知识库文章: 如何访问 Active IQ Unified Manager 虚拟机 DIAG shell。
 

  1.  登录到 UM CLI(对于 Windows,请使用命令提示符): um cli login -u <maintenance_user>
  2. 提供维护用户凭据
  3. 获取要更改的条目的数据源 ID: um datasource list
  4. 修改数据源: um datasource modify -U <USERNAME> -P <PASSWORD><DATASOURCE_ID>

 

注意:  

  • 如果密码包含特殊字符,则可能也需要转义这些字符。这是通过在特殊字符前面添加 \ 来完成的。
  • 示例:

此密码: ABCD!(1234)ab
将键入为:ABCD\!\(1234\)ab

  • 指示需要转义字符的消息如下所示:

-bash: !: event not found
-bash: syntax error near unexpected token `)'

  • 我们还需要注意的是,密码中不接受“&”符号。并且使用斜杠符号(/)传递它的常规方法将不起作用。
  • 错误消息示例:

At line:1 char:42
+ um datasource add -U demo\training -P Yi5&5pQrSt                           
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
   + CategoryInfo      : ParserError: (:) [], ParentContainsErrorRecordException
   + FullyQualifiedErrorId : AmpersandNotAllowed

  • 如果有 & 号 "&" 符号,则我们必须在 & 号 "&" 符号前后使用双引号来传递它。

例如,如果密码是:Yi5&5pQrSt
那么我们必须在双引号中传递 & 和其他特殊字符,如果有多个特殊字符连在一起,则将它们放在一对双引号中。

示例如下:

Eg1:

Yi5"&"5pQrSt

示例 2:

0nYi5”&”5”!^”TpF”%”b2R

  • 如果 AIQUM 服务器在 Windows 上,则转义密码的过程完全不同
  • 确保您使用的是 cmd.exe,而不是 powershell 来运行 um cli 命令,因为 Windows um 命令是作为批处理脚本实现的
  • 只需用双引号将密码括起来即可“转义”它:
  • 例如 um datasource add -U demo\\training -P "Yi5@5pQrSt"<DATASOURCE_ID>,在这种情况下,密码是 Yi5@5pQrSt

追加信息

追加信息文本

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.