I have two Sparc Solaris 10 servers (a T1000 and an ultra 45) that I recently began to administer (after a long period of thinking I would never touch Solaris again).
One of the security requirements I need to do is update /etc/security/policy.conf to use sha-256. When I modify the policy.conf file to point to sha-256, I am able to successfully change passwords and I see that the /etc/shadow file gets correspondingly updated with the new algorithm (5$), but when I then try to logon through SSH, XServer, or locally, I get "password incorrect".
I am positive I am using the exact same string of characters for the password when I change it as the string I use for login. I suspect either it isn't getting hashed the same by login as it is by passwd, or possibly it's using something other than PAM to put it into /etc/shadow maybe?
These are my relevant entries in /etc/security/crypto.conf
1 crypt_bsdmd5.so.1
2a crypt_bsdbf.so.1
md5 crypt_sunmd5.so.1
5 crypt_sha256.so.1
6 crypt_sha512.so.1
And here is the relevant entries in policy.conf
CRYPT_ALGORITHMS_ALLOW=1,2a,md5,5,6
CRYPT_DEFAULT=5
#CRYPT_ALGORITHMS_DEPRECATE=__unix__
The old policy.conf
CRYPT_ALGORITHMS_ALLOW=1,2a,md5
CRYPT_DEFAULT=__unix__
#CRYPT_ALGORITHMS_DEPRECATE=
I've tried using different algorithms for the default (md5, 6) but no success with those either, I can change a password with passwd, then I can no longer authenticate to login as that user with the new or old password (and like I said, the shadow file is getting updated anyway so it couldn't be the old password, but I have tried it and am also positive I am using the correct old password)
I've also tried uncommenting the CRYPT_ALGORITHMS_DEPRECATE and setting it to __unix__
but I can ONLY authenticate with a password when the policy.conf is pointing to __unix__
and DEPRECATE line is commented out (and I have set the password using those settings). Based on online suggestions I've seen NIS,NIS+,LDAP, or PAM as possible issues but I am having difficulty figuring out if any of those are in play here.
I also saw a suggestion that you must delete the password that has an old algorithm before changing it so I tried that (passwd -d username
, check shadow and it's gone, then passwd username
). I've also tried a few combinations of rebooting after changing the policy.conf and using cryptoadm to restart... kcfd? I believe.
Does anyone have any idea what could be going on here? There is scant information online and it is all from 2015 or earlier (not that that matters, I assume most Solaris help was last decade, this security requirement might be new though).
Any help would be really appreciated. I managed to brick one of them because I forgot to change the policy.conf back to unix while I was tinkering with it and killed my root password. I think I have recovered from that before by going into single-user mode on via the ALOM but it has been so freaking long I don't quite remember, anyway, this question is mostly about how to get them into security compliance, not fixing my dumb mistake. I still have the other machine with the old policy.conf and he is fine.
Also posted to StackOverflow.