Hi,
We need to migrate the configuration of an old server (AIX 5.1) to a new one (AIX 5.3).
At first we thought upgrading the old server to 5.3, then mksysb and restore on the new one. But the customer has said we cannot upgrade the old server, because it's running their production.
As the new server is POWER5, we cannot restore a 5.1 mksysb, so we're going to do a fresh-install, and then migrate step by step the configuration.
We're thinking about listing all the users to a file, and then recreating the users from this file on the new server, something like:
So the file migrate_users would look like:
But I'm having some trouble with the gecos attribute, because of blank spaces. Some of the users have blanks in this field, and others don't, so I don't know the $positicion of the attributes listed after gecos.
Do you know a way to avoid that, or is there a simplier way to migrate users?
I'm thinking about just copying /etc/passwd, /etc/security/passwd , etc...
Is it possible to do it this way, and what files are needed?
Thanks.
Thanks.
We need to migrate the configuration of an old server (AIX 5.1) to a new one (AIX 5.3).
At first we thought upgrading the old server to 5.3, then mksysb and restore on the new one. But the customer has said we cannot upgrade the old server, because it's running their production.
As the new server is POWER5, we cannot restore a 5.1 mksysb, so we're going to do a fresh-install, and then migrate step by step the configuration.
We're thinking about listing all the users to a file, and then recreating the users from this file on the new server, something like:
Code:
lsuser ALL | awk '{print "mkuser "$2" "$3" "$4 ... " "$1}'>migrate_users
Code:
mkuser id=203 pgrp=staff groups=staff,ggg home=/home/username1 ... username1
mkuser id=204 pgrp=staff groups=staff,ggg home=/home/username2 ... username2
But I'm having some trouble with the gecos attribute, because of blank spaces. Some of the users have blanks in this field, and others don't, so I don't know the $positicion of the attributes listed after gecos.
Do you know a way to avoid that, or is there a simplier way to migrate users?
I'm thinking about just copying /etc/passwd, /etc/security/passwd , etc...
Is it possible to do it this way, and what files are needed?
Thanks.
Thanks.