Dê uma olhada em /etc/default/passwd
. Existe uma diretiva chamada PASSLENGTH
. Por padrão, ele tem o valor 6
e a alteração da senha é:
# passwd root
New Password:
passwd: Password too short - must be at least 6 characters.
Verifique também o conteúdo de /etc/pam.conf
e verifique se existem seções como as seguintes:
#
# passwd command (explicit because of a different authentication module)
#
passwd auth required pam_passwd_auth.so.1
e
# Password construction requirements apply to all users.
# Remove force_check to have the traditional authorized administrator
# bypass of construction requirements.
other password requisite pam_authtok_check.so.1 force_check
Para mais informações, consulte man -s 5 pam_authtok_check
Ao usar truss
para ver quais arquivos são usados pelo binário passwd
, a seguinte saída é retornada:
# truss -t open passwd root
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
open("/lib/libbsm.so.1", O_RDONLY) = 3
open("/lib/libpam.so.1", O_RDONLY) = 3
open("/lib/libnsl.so.1", O_RDONLY) = 3
open("/usr/lib/passwdutil.so.1", O_RDONLY) = 3
open("/lib/libc.so.1", O_RDONLY) = 3
open("/lib/libsocket.so.1", O_RDONLY) = 3
open("/lib/libmd.so.1", O_RDONLY) = 3
open("/lib/libsecdb.so.1", O_RDONLY) = 3
open("/lib/libcmd.so.1", O_RDONLY) = 3
open("/platform/SUNW,SPARC-Enterprise-T5220/lib/libc_psr.so.1", O_RDONLY) = 3
open("/etc/pam_debug", O_RDONLY) Err#2 ENOENT
open("/etc/pam.conf", O_RDONLY) = 3
open("/usr/lib/security/pam_passwd_auth.so.1", O_RDONLY) = 3
open("/etc/nsswitch.conf", O_RDONLY|O_LARGEFILE) = 3
open("/etc/passwd", O_RDONLY|O_LARGEFILE) = 3
open("/usr/lib/security/pam_dhkeys.so.1", O_RDONLY) = 3
open("/usr/lib/security/pam_authtok_get.so.1", O_RDONLY) = 3
open("/usr/lib/security/pam_authtok_check.so.1", O_RDONLY) = 3
open("/usr/lib/security/pam_authtok_store.so.1", O_RDONLY) = 3
open("/dev/tty", O_RDWR) = 3
New Password:
open("/etc/default/passwd", O_RDONLY) = 3
open("/etc/shadow", O_RDONLY|O_LARGEFILE) = 3
open("/etc/security/policy.conf", O_RDONLY) = 3
passwd: Password too short - must be at least 6 characters.
Please try again
open("/dev/tty", O_RDWR) = 3
New Password: Received signal #2, SIGINT, in read() [caught]