1

Currently i am using a SunSolaris machine:

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

When i try to set null(blank) password for root, it let me do it:

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#

I repeated the same test on my Centos Linux machine and it didnt let me set null password for root user:

[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

My question is how can i disable the null password completely(globally) on my Solaris machine?

I have already checked following links, but no help:

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

Is there any way to control this via pam.conf file?

Here is the output:

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#

1 Answer 1

2

Have a look in /etc/default/passwd. There is a directive called PASSLENGTH. By default it has the value 6 and changing the password gives:

# passwd root
New Password: 
passwd: Password too short - must be at least 6 characters.

Also check the content of /etc/pam.conf and verify if sections like the following exists:

#
# passwd command (explicit because of a different authentication module)
#
passwd  auth required           pam_passwd_auth.so.1

and

# 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

For more information, see man -s 5 pam_authtok_check

When using truss to see which files are used by the passwd binary the following output is returned:

#  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]
13
  • Thanks, but its already set to 10: MINALPHA=4 MINDIFF=7 MINSPECIAL=2 MAXREPEATS=2 WHITESPACE=YES NAMECHECK=YES DICTIONDBDIR=/var/passwd DICTIONLIST=/usr/share/lib/dict/words MAXWEEKS=99 WARNWEEKS=2 PASSLENGTH=10 Commented Jan 5, 2016 at 9:31
  • @ShahHussain, see updated answer.
    – Lambert
    Commented Jan 5, 2016 at 9:52
  • Tested, but still same: Commented Jan 5, 2016 at 10:18
  • I am sorry, for some reason, not able to enter text in proper format. Commented Jan 5, 2016 at 10:22
  • 1
    Do you have access to MOS? See documents 1500188.1 and 1321384.1. Looks like you might need to have at least patch 145790-01. Or better, have patch 148049-04
    – Lambert
    Commented Jan 6, 2016 at 8:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .