Force a minimum password length on a Cisco router

You can by default set a password of a single character on a router, or a very short password. This is obviously a security risk. It would be better to force a password of a minimum length of 8 or more characters.
This command was introduced in IOS version 12.3(1). The default length is 6 characters.


To set a minimum password length, enter the following commands:

Router>enable
Router#configure terminal
Router(config)#security passwords min-length 8


If a user now attempts to set the enable password to Cisco for example, the following happens:

Router(config)#enable password cisco
% Password too short - must be at least 8 characters. Password configuration failed
Router(config)#

OR

Router(config)#username user1 password cisco
% Password too short - must be at least 8 characters. Password configuration failed
Router(config)#

I recommend that you do this to insure better security practice.