1

Does anyone know why Solaris requires the "old" root password when changing the password as root or with sudo? How can this be changed to work like Linux where only the new password needs to be specified? It also should not prompt for an LDAP password for "root".

# uname -a 
SunOS hostname 5.9 Generic_118558-10 sun4us sparc FJSV,GPUZC-M  
# id 
uid=0(root) gid=1(other)  
# sudo passwd root 
Password:  
LDAP Password:  
passwd: Sorry, wrong passwd 
Permission denied  

As seen above, it wants the current password for 'root' before allowing a new password to be set. If the current password is specified correctly, then it prompts to set the "New Password":

# sudo passwd root 
Password:  (Entered current password)
New Password:  
Enter login(LDAP) password: (Just press enter) 
Password change aborted 
Re-enter new Password:  
passwd: password successfully changed for root
4
  • 1
    as far as I recall, sudo is not part of Solaris 9 out of the box. It is provided by CSW or needs to compile from source. I expect that it is not properly implemement.
    – BitsOfNix
    Commented Jan 25, 2017 at 9:10
  • LDAP also appears to be involved, and that may be affecting the behavior. IIRC, Solaris 9 also didn't ship with LDAP - that would have been added by local administrators. Commented Jan 25, 2017 at 10:20
  • Not sure why you're adding sudo to the mix if you're already root. Commented Jan 25, 2017 at 22:40
  • The same old password prompt is seen even without sudo. Commented Jan 26, 2017 at 2:15

1 Answer 1

2

I'd have to test it (and it may change across versions of Solaris and patch levels), but I believe you need to know the password of root in order to change root's password as part of a security check.

You must log in to answer this question.

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