How to migrate user accounts from Compaq/hp Tru64 to Red Hat Enterprise Linux?

Solution Verified - Updated -

Environment

  • Compaq/hp Tru64 Unix in "Trusted" mode
  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6

Issue

Need to migrate user accounts from Compaq/hp Tru64 server in "trusted" mode to a RHEL server.

Resolution

Run edauth -g to extract user names and password hashes, then set those hashes as is in /etc/shadow on RHEL.

  1. extract user accounts from Tru64:
    # edauth -g | grep u_pwd= | cut -d: "-f1,4" | sed 's/u_pwd=//g' > tru64-accounts
  2. copy the tru64-accounts file to the RHEL server
  3. inspect the tru64-accounts file manually to remove system accounts and accounts which should not be migrated
  4. create accounts in batch:
# cat tru64-accounts | (while read X
do
USERNAME=`echo $X | cut -d: -f1`
PASSWORD=`echo $X | cut -d: -f2`
echo Creating account for user $USERNAME..
useradd -m -p "$PASSWORD" $USERNAME
done)

Root Cause

Compaq/hp Tru64 Unix uses Bigcrypt to hash user passwords. This is a modified two-part crypt hash which allows for passwords longer than 8 characters in length on legacy Unix systems.
Red Hat Enterprise Linux implementation of Pluggable Authentication Modules (PAM) does support Bigcrypt hashes, hence the transparent migration.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments