Resolution
Instead of copying to configuration in enable prompt, copy the configuration in the global configuration mode.
When creating a configuration file, you must list commands logically so that the system can respond appropriately. To accomplish this, perform these steps:
Copy an existing configuration from a switch to a server.
Open the configuration file in a text editor, such as vi or emacs, on UNIX or Notepad on a PC.
Extract the portion of the configuration file with the desired commands, and save it in a new file.
Copy the configuration file to the appropriate server location. For example, copy the file to the TFTP directory on the workstation (usually /tftpboot on a UNIX workstation).
Make sure the permissions on the file are set to world-read.
For more information, refer to the Creating a Configuration File By Using a Text Editor section of Working with the IOS File System, Configuration Files, and Software Images.
After reloading the switch, if the old password is not accepted, a password recovery is necessary on the switch.
For more information, refer to Password Recovery Procedures, and select the appropriate device type.