Desativar senha nula para usuário root na máquina Sunsolaris?

1

Atualmente estou usando uma máquina SunSolaris:

bash-3.00# uname -a
SunOS labxxxx 5.10 Generic_144488-17 sun4u sparc SUNW,Netra-240
bash-3.00#

Quando eu tento definir uma senha nula (em branco) para root, deixe-me fazer:

SunOS labxxxx 5.10 Generic_144488-17 sun4u sparc SUNW,Netra-240
bash-3.00# passwd root
New Password:
Re-enter new Password:
passwd: password successfully changed for root
bash-3.00#

Eu repeti o mesmo teste na minha máquina Centos Linux e ele não me deixou definir a senha nula para o usuário root:

[root@localhost linuxLogs]# uname -a
Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost linuxLogs]# passwd root
Changing password for user root.
New password:
BAD PASSWORD: it is WAY too short
BAD PASSWORD: is a palindrome
Retype new password:
No password supplied
passwd: Authentication token manipulation error

A minha pergunta é como posso desabilitar a senha nula completamente (globalmente) na minha máquina Solaris? Qualquer ajuda sobre isso seria muito apreciada.

Eu já verifiquei os links a seguir, mas não há ajuda:

http://www.informit.com/articles/article.aspx?p=101163&seqNum=7
https://community.oracle.com/thread/1927039?start=0&tstart=0
http://www.unix.com/solaris/125161-solaris-10-allow-ssh-login-empty-passwd.html
http://docs.oracle.com/cd/E19253-01/816-4863/pam-20/index.html

Existe alguma maneira de controlar isso através do arquivo pam.conf ?

Como solicitado por Lambert, aqui está a saída do senhor:

bash-3.00# file $(which passwd)
/usr/bin/passwd:        ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped
bash-3.00# 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,Netra-240/lib/libc_psr.so.1", O_RDONLY) = 3
open("/usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.3", 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:     Received signal #20, SIGWINCH, in read() [default]

open("/dev/tty", O_RDWR)                        = 3
Re-enter new Password:
bash-3.00#

Atenciosamente,

    
por Shah Hussain 05.01.2016 / 10:13

1 resposta

2

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]
    
por 05.01.2016 / 10:19

Tags