Inputting Character Strings and Passwords
This section applies to configuring character strings and CLI user passwords (that is, the passwords used to log in to the CLI). This section does not apply to entering other types of passwords, such as commands where you specify passwords for FTP/SFTP.
Some commands require you to enter character strings. If the character string includes any of the following special characters, then special handling is required:
Table 1: Special Characters
Special Character | Name | Uses |
---|---|---|
| | pipe | Used for controlling output |
; | semicolon | Used for delimiting commands |
? | question mark | Used for listing command completion options |
<space> | space | Used for delimiting words |
! | exclamation mark | Used for delimiting comments (such as in scripts) |
“ | quotation mark | Used for delimiting character strings |
\ | backslash | Used for escaping special characters |
How you enter these special characters depends on where you type the character string. The CLI allows you two ways of entering character strings:
Entering a Character String Directly on the Command Line
When entering a character or CLI user password string directly on the command line and that string contains special characters, enclose the entire string in quotation marks.
For example:
bti7800(config-module-ufm:1/7)# custom1 "abcd!efg"
bti7800(config-module-ufm:1/7)# commit
Commit complete.
bti7800(config-module-ufm:1/7)# do show equipment chassis:1
module ufm:1/7
Module PEC Admin Oper Custom1 --------------- -------------- -------- --------------- ------------ ufm:1/7 BT8A78UFM4 up notPresent abcd!efg
If the string includes a backslash (\) or a quotation mark (“), precede it with a backslash (\) to escape it.
For example:
bti7800(config-module-ufm:1/7)# custom1 "abcd\\efg"
bti7800(config-module-ufm:1/7)# commit
Commit complete.
bti7800(config-module-ufm:1/7)# do show equipment chassis:1
module ufm:1/7
Module PEC Admin Oper Custom1 --------------- -------------- -------- --------------- ------------ ufm:1/7 BT8A78UFM4 up notPresent abcd\efg
bti7800(config-module-ufm:1/7)# custom1 "abcd\"efg"
bti7800(config-module-ufm:1/7)# commit
Commit complete.
bti7800(config-module-ufm:1/7)# do show equipment chassis:1
module ufm:1/7
Module PEC Admin Oper Custom1 --------------- -------------- -------- --------------- ------------ ufm:1/7 BT8A78UFM4 up notPresent abcd"efg
Entering a Character String in Response to a Prompt
When entering a character string in response to a prompt, there are fewer restrictions, but there are differences between configuring a character string for a parameter and configuring a CLI user password.
When configuring a CLI user password, you can use all special characters at the prompt.
For example:
bti7800(config)# users user password
(<string: Password >): abcd”;\|efg
Note The password is shown in clear text for illustration purposes only. On the CLI, the password is shown as a series of asterisks (*).
When configuring a character string, you can use all special characters but if your string includes a backslash (\) or a quotation mark (“), you must escape it with a backslash (\).
For example:
bti7800(config-module-amp:1/4)# custom1
(<string, min: 0 chars, max: 255 chars>) (): abcd\”:\\|efg
bti7800(config-module-amp:1/4)# commit Commit complete. bti7800(config-module-amp:1/4)# do show equipment chassis:1 module amp:1/4 Module PEC Admin State Oper State Custom1 --------------- -------------- -------------- --------------- --------------- amp:1/4 BT8A78AMP1 up down abcd":\|efg