Converting password hashes from HP-UX 11.11 to Solaris is pretty simple if you are using UNIX crypt passwords (if HP-UX isn't a Trusted System. If it is, it will use bigcrypt passwords, > 8 characters, converting them to Solaris UNIX crypt could be problematic).
Here's the gest of it:
On the HP-UX System, we create a test user:
# useradd testNow we convert the passwd file to generate passwd entries for Solaris:
# passwd test
test
- # awk ' BEGIN { FS = ":" } { print $1":x:" $3 ":" $4 "::/export/home/" $1 ":/usr/bin/sh" }' /etc/passwd
- test:x:107:20::/export/home/test:/usr/bin/sh
And we create the shadow file entries, including the password hash:
Just add them using /usr/ucb/vipw to the password file, edit the shadow file for consistency and test. Be sure to backup the files and to test using a few users at first.
- # awk ' BEGIN { FS = ":" } { print $1":"$2"::::::" }' /etc/passwd
- test:lsDWJo7M.iAhY::::::
Mix with some shell scripting and mkdir's and you're set :-). Next time, use LDAP :P.
- $ su test
- Password:
- $ id
- uid=127(test) gid=120
- $ whoami
- test
- $ echo $HOME
- /export/home/test
- $ echo $SHELL
- /usr/bin/sh
1 comments:
Really helpful. Needed this quick guide. Thanks.
Post a Comment