- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: How can I migrate user accounts from HP-UX 11i...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2008 04:24 AM
тАО04-10-2008 04:24 AM
We have many local user accounts (2000 ish) that we would need to migrate (preferably including passwords) if we choose to take this direction, but I cannot determine how this might be achieved. Any ideas?
Also, the HP-UX OS is running is trusted mode (i.e. with a tcb database) just to make think interesting!
****Please donтАЩt give advise as the pros and cons of HPUX verses RHEL, we have already spent much time investigating this area and the user migration is now our only blind (and untested) spot.****
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2008 04:28 AM
тАО04-10-2008 04:28 AM
Re: How can I migrate user accounts from HP-UX 11iv2 to Red Hat Enterprise 5?
I forgot to put the word Linux in the forum thread's header.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2008 10:20 AM
тАО04-10-2008 10:20 AM
Re: How can I migrate user accounts from HP-UX 11iv2 to Red Hat Enterprise 5?
Just copy the /etc/passwd and /etc/shadow(if shadow installed) file.
Then in Linux create the user from the /etc/passwd file using awk script.
more /etc/passwd|awk -F":" '{print "mkdir /home/"$1}'>create-home.sh
more /etc/passwd|awk -F":" '{print "chown -R "$1":"$1 " /home/"$1}'>owner-user.sh
Using this format you can create.
Thanks & Regards
Aashique
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2008 11:53 PM
тАО04-10-2008 11:53 PM
Re: How can I migrate user accounts from HP-UX 11iv2 to Red Hat Enterprise 5?
Also HPUX and Linux assign different UIDs to systems users, hence I cannot simply copy over /etc/passwd and /etc/group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2008 12:55 AM
тАО04-11-2008 12:55 AM
Re: How can I migrate user accounts from HP-UX 11iv2 to Red Hat Enterprise 5?
newusers
Also you could set the password to be changed at first login so the user could choose their own password again
http://kbase.redhat.com/faq/FAQ_43_4400.shtm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2008 03:23 AM
тАО04-11-2008 03:23 AM
Re: How can I migrate user accounts from HP-UX 11iv2 to Red Hat Enterprise 5?
Now can anyone advise me how I might get the passwords (and other relevand data) our of the /tcb database on HPUX in a form that Red Hat Linux's newuser command will understand?
Thanks all for your contributions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2008 07:47 AM
тАО04-11-2008 07:47 AM
SolutionAssuming that works, your next decision needs to be your permanent password hash. I think the typical default setup on current Linux systems will update the password hash to md5 on the next password change. You'll have to pull out your crystal ball and take a guess on what future migrations you might need - for example, I think HP-UX can use bigcrypt and not md5, but a lot of LDAP servers can use md5 and not bigcrypt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2008 08:09 AM
тАО04-11-2008 08:09 AM
Re: How can I migrate user accounts from HP-UX 11iv2 to Red Hat Enterprise 5?
Thanks again all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2008 02:25 AM
тАО04-22-2008 02:25 AM
Re: How can I migrate user accounts from HP-UX 11iv2 to Red Hat Enterprise 5?
Here is the quick script (to be executed on our HP-UX OS) I've created that spits out the Linux commands to create the users as we want them to be:
#!/usr/bin/ksh
################################################################################
# Author: Ivan Delany #
# Created: 18 April 2008 #
# #
# Modification history: #
# #
# #
# Description: #
# Creates useradd commands to migrate all normal Fiscal users to Linux #
# #
# #
################################################################################
#Select all BDL users (not 3rd party users)
for user in `logins|awk '{print $1}'`
do
if ((`groups $user|grep bdc|wc -l` ==1)) then
#Verify user uid is above 501 and is not already in TTWORK group
if ((`id -u $user` > 501))
then
userprigroup=`id -nG $user|awk '{printf $1}'`
usergroups=`id -nG $user|awk '{for (i=2; i<=NF; i++) if (i == NF) printf $i ; else printf $i","}'`
comment=`cat /etc/passwd|awk -F":" -v userawk=$user '{if ($1 == userawk) print $5}'`
uid=`cat /etc/passwd|awk -F":" -v userawk=$user '{if ($1 == userawk) print $3}'`
# Get encrypted password from tcb database
firstchar=`echo $user|cut -c1-1`
password=`grep u_pwd /tcb/files/auth/$firstchar/$user`
password=${password#*=}
password=${password%:*}
if [[ $usergroups = "" ]]
then
echo "useradd -u $uid -s /bin/ksh -g $userprigroup -d /home/uvdls -c \"$comment\" -p $password $user"
else
echo "useradd -u $uid -s /bin/ksh -g $userprigroup -G $usergroups -d /home/uvdls -c \"$comment\" -p $password $user"
fi
echo "chage -d 0 $user"
fi
fi
done