To increase security, it is recommended that the default, factory password be changed immediately. This section describes how to force users, including admin users, to change their login after first successful login. This is not applicable to the root user.
device# configure terminal
device(config)# password-attributes force-default-password-change
When the user logs in for the first time, they will be forced to change their password.