service password-in-config
Determines whether passwords will be displayed in configurations, or be replaced by asterisks.
service password-in-config
no service password-in-config
Must be in configuration mode (config), which requires privileged-level access.
Use once.
Passwords are displayed.
Use the no form of the command to obscure passwords in all configurations; passwords (including both user account passwords and the enable password) will be displayed as a string of eight asterisks: ********.
This will cause the following behavior when you use the copy command, which will copy the asterisks as simple characters (without special meaning):
- If you copy the running configuration to the startup configuration, passwords will be displayed as asterisks (********) when you view the startup configuration; but the correct passwords will be correctly configured upon reboot
- If you delete users from the running configuration and copy the startup configuration back to the running configuration, the user definitions will not be written into the running-config and the users will not have access to the device; but they will still be configured properly upon reboot
- If you copy the running configuration to a file, passwords will be exported as ********.
- If you copy a configuration from a file URL to the running configuration, passwords that are displayed as asterisks in the source file will be ignored by the copy command. For this reason, the string ******** is not allowed as a password.
- If you copy a configuration from a file URL to the startup configuration, passwords are copied as is; those that were displayed as asterisks in the source file will be ignored when the system is rebooted.
- When you copy to the running configuration, the copy command performs a merge operation, so that all passwords defined in the running configuration remain intact; after the following commands, all users would continue to be defined in the running configuration:
copy running-config <some_file>
copy <some_file> running_config
However, if you delete users between copy commands, users will not remain intact; after the following sequence of actions, users would be lost:
copy running-config <some_file>
<delete users from running configuration>
copy <some_file> running_config