How to edit the credentials for an Unified Manager cluster data source via command line?
Applies to
- ActiveIQ Unified Manager (AIQUM) 9.6+
- OnCommand Unified Manager(OCUM) 9.5 and below
- All OS platforms
Answer
For OnCommand Unified Manager OVA installations you will first need to gain "diag" access to the command line. Use the following Knowledge Article: How to access the OnCommand Virtual Machine DIAG shell.
- Log in to UM CLI (for Windows, use Command prompt):
um cli login -u <maintenance_user>
- Provide the maintenance user credentials
- get the data sources ID of the entry to be changed:
um datasource list
- Modify the data source:
um datasource modify -U <USERNAME> -P <PASSWORD> <DATASOURCE_ID>
Note:
- If the password contains special characters, these may need to be escaped too. This is done by adding a
\
in front of the special character. - Example:
This password: ABCD!(1234)ab
Would by typed: ABCD\!\(1234\)ab
- Messages indicating a character needs to be escaped would look like one of these:
-bash: !: event not found
-bash: syntax error near unexpected token `)'
- We also need to note that the ampersand "
&
" symbol is not accepted in the Password. And the regular method of passing it with a slash sign (/
) will not work. - Example of Error Message:
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
- If there is an ampersand "
&
" symbol, then we will have to pass this by using double quotes before and after the ampersand "&
" symbol.
Example if the password is: Yi5&5pQrSt
then we have to pass the ampersand and other special characters within Double Quotes, if you have multiple special characters together, then put them within on single pair of Double Quotes.
Examples below:
Eg1:
Yi5"&"5pQrSt
Eg 2:
0nYi5”&”5”!^”TpF”%”b2R
- If the AIQUM server is on Windows, the process of escaping the password is entirely different
- Ensure you are using cmd.exe, not powershell to run the um cli commands, as the Windows um command is implemented as a batch script
- Simply double-quote the password to "escape" it:
- e.g.
um datasource add -U demo\\training -P "Yi5@5pQrSt" <DATASOURCE_ID>
where the password in this case isYi5@5pQrSt
Additional Information
additionalInformation_text