修改最短密码长度需要编辑login.defs文件(vi /etc/login.defs),把下面这行 PASS_MIN_LEN 5 (默认的情况)中的5更换 login.defs文件是login程序的配置文件。