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
Really helpful. Needed this quick guide. Thanks.
ReplyDelete