On Tue, Nov 26, 2024 at 04:35:54PM +0000, Marek Pniok via IBM TechXchange Community wrote:
> recently I got an idea to create a simple scripts which one of them
> would export users from AIX and the other script would import them
> to Linux(RHEL) to make migration of users faster.
Why? No one moves to Linux in this community.
*sarcasm off*
I can see that may have some utility, and lsuser's colon output makes
it easy.
> Unfortunately I have run to an issue with migration of the hashed
> passwords. Both of the systems have different default hashing. For
> AIX we use sha256 and on the RHEL sha512. Is there some possible way
> to do such conversion so the hash would work on both systems or did
> someone already solved this issue in the past?
You should compare the AIX /etc/security/passwd hash value against
RHEL's /etc/shadow. I think they use a common format now. RHEL may not
allow you to create new SHA256 hashes, but it may read the old. The
start of the hash has a prefix that says the hash algorithm and
strength, followed by salt and hash.
You can also configure AIX on the fly to use SHA512 for password
hashes. All that happens is on next password change it will use SHA512
instead. The old passwords are still valid.
It may be worth a try to just copy over a hash from AIX to RHEL and
test.
You cannot convert hashes without access to the original plaintext
password.
Further reading:
https://www.ibm.com/support/pages/aix-making-sha-256-and-sha-512-passwords-compatible-other-oss------------------------------------------------------------------
Russell Adams
Russell.Adams@AdamsSystems.nlPrincipal Consultant Adams Systems Consultancy
https://adamssystems.nl/