Set the Hostname, Domain Name, and the Enable and Telnet Passwords
To set the hostname, domain name, and the enable and Telnet passwords, perform the following steps.
Before you begin
Before you set the hostname, domain name, and the enable and Telnet passwords, check the following requirements:
In multiple context mode, you can configure the hostname and domain name in both the system and context execution spaces.
For the enable and Telnet passwords, set them in each context; they are not available in the system. When you session to the ASASM from the switch in multiple context mode, the ASASM uses the login password you set in the admin context.
To change from the system to a context configuration, enter the changeto context name command.
Specify the hostname for the ASA or for a context. The default hostname is “asa.”
This name can be up to 63 characters. The hostname must start and end with a letter or digit, and have only letters, digits, or a hyphen.
When you set a hostname for the ASA, that name appears in the command line prompt. If you establish sessions to multiple devices, the hostname helps you keep track of where you enter commands.
For multiple context mode, the hostname that you set in the system execution space appears in the command line prompt for all contexts. The hostname that you optionally set within a context does not appear in the command line, but can be used by the banner command $(hostname) token.
Specify the domain name for the ASA. The default domain name is default.domain.invalid.
The ASA appends the domain name as a suffix to unqualified names. For example, if you set the domain name to “example.com” and specify a syslog server by the unqualified name of “jupiter,” then the ASA qualifies the name to “jupiter.example.com.”
Change the enable password. By default, the enable password is blank.
enable password password
The enable password lets you enter privileged EXEC mode if you do not configure enable authentication. The enable password also lets you log into ASDM with a blank username if you do not configure HTTP authentication.
The password argument is a case-sensitive password of 3 to 32 characters long, and can be any combination of ASCII printable characters (character codes 32-126), with the exception of spaces and the question mark.
This command changes the password for the highest privilege level (15). If you configure local command authorization, you can set enable passwords for each privilege level from 0 to 15 using the following syntax:
enable password password level number
The encrypted keyword indicates that the password is encrypted (using an MD5-based hash or a PBKDF2 (Password-Based Key Derivation Function 2) hash). When you define a password in the enable password command, the ASA encrypts it when it saves it to the configuration for security purposes. When you enter the show running-config command, the enable password command does not show the actual password; it shows the encrypted password followed by the encrypted keyword. For example, if you enter the password “test,” the show running-config command output would appear as something similar to the following:
The only time you would actually enter the encrypted keyword at the CLI is if you are cutting and pasting a configuration file for use in another ASA, and you are using the same password.
Enter the enable password command without a password to set the password to the default, which is blank.
Set the login password for Telnet access. There is no default password.
The login password is used for Telnet access when you do not configure Telnet authentication. You also use this password when accessing the ASASM from the switch with the session command.
passwd password [encrypted]
The password is a case-sensitive password of up to 16 alphanumeric and special characters. You can use any character in the password except a question mark or a space.
The password is saved in the configuration in encrypted form, so you cannot view the original password after you enter it. If for some reason you need to copy the password to another ASA but do not know the original password, you can enter the passwd command with the encrypted password and the encrypted keyword. Normally, you only see this keyword when you enter the show running-config passwd command.