Sounds like you might be running an ancient version of the Shadow programs.
Password length is likely set in /etc/login.defs:
Quote:
# Number of significant characters in the password for crypt().
# Default is 8, don't change unless your crypt() is better.
# Ignored if MD5_CRYPT_ENAB set to "yes".
#
PASS_MAX_LEN 20
|
Easiest thing is to update the shadow package using your distro tools. Fallback option is to compile shadow yourself and make sure the right options get set in building and in login.defs. Note that there's a few other login programs around, such as the one that can be built in util-linux, but probably you are not running that.