Problem
I am looking for a way to move my user accounts from one operating system or release to another.
Solution
To move accounts from Unixware 7 to Unixware 7 or 2.1.X or OpenServer 5 to Unixware you can use the 'ap' command.
'ap' provides a simple method of propagating user account profiles between UnixWare 7 or 2.1 systems.
Run the command:# ap -dgv > users.apThis will dump all the users so you can use your favorite editor to only include the user accounts and not the admin accounts when migrating to another server.
To avoid moving the "root" user try:
# ap -dgv `cat /tmp/passwd | cut -d : -f 1 | grep -v root | \
grep -v "+"` > users.apTo import the users on the new server run:
# ap -r -v -f users.apThe version of ap(ADM) in SCO OpenServer (TM) can also dump account profiles. 'ap' in UnixWare can read such profiles and recreate the associated user accounts on a UnixWare system.
An account profile entry consists of a user's entry from the password file followed by all relevant parts of their Identification & Authentication (I&A) for UnixWare or Protected Password for SCO OpenServer database entry. The following database fields are irrelevant and are not copied:
* time of last unsuccessful password change* time of last successful and last unsuccessful login
* terminal of last successful and last unsuccessful login
* number of consecutive unsuccessful loginsUnixWare only:/etc/default/useradduser defaults' file/etc/security/ia/ageduidaged user ID file/etc/security/ia/auditmaster audit file (if auditing is installed)/etc/security/ia/indexI&A master index file/etc/security/ia/masterI&A master database/etc/security/tcb/privssystem command privilege database/etc/security/tfm/users/ *user authorizations/etc/security/tfm/roles/ *administrative role authorizationSCO OpenServer only:/etc/default/accountsuser and group defaults' file/tcb/files/auth/?/ *Protected Password database/etc/auth/subsystems/ *Subsystem Authorizations databaseCommon files:/etc/groupgroup file/etc/passwdpassword file/etc/shadowshadow password file/etc/default/passwdPassword Security Default SettingsExample(s):To dump the account profiles for users fred and guest on an SCO OpenServer system to a file called profiles, and display a message after each account profile is dumped:
ap -dv fred guest > profiles.acctThis file can then be transferred to a UnixWare machine.
To restore the account profile for user fred on a UnixWare system, overwriting any existing profile, and substituting the password ``clydenw'' if the existing password is longer than 8 characters:
ap -ro -f profiles.acct -p clydenw fredNOTES:Account profiles dumped on one UnixWare system can only be restored on another UnixWare systems. They cannot be restored to an SCO OpenServer system because UnixWare encrypted passwords are not transferable to SCO OpenServer.
As UnixWare systems may have different system default values, the same profile transferred to another UnixWare system may give the user different capabilities simply because different default values are picked up for fields that are not present in the profile entry for a user.
As the file containing the dumped account profile information is used to update the password and I&A database, it must be protected from unauthorized access in the same way that entries in the I&A database themselves are protected.
Privileges are not mapped between SCO OpenServer and UnixWare systems, however, some audit events are. Default audit values for AUDIT_MASK in /etc/default/useradd are included in addition to any mapped events when a user profile is restored. The table below shows how events are mapped between SCO OpenServer and UnixWare systems.
For Unixware 2.1.XA version of ap that runs on UnixWare 2.1 is separately available for downloading from the SCO Secure Technologies Group.
See also
For OpenServer:addxusers(ADM), authck(ADM), authcap(F), fields(S), getprpwent(S), getpwent(S), group(F), passwd(FP), shadow(F), subsystems(S)
For Unixware:filepriv(1M), group(4), groupadd(1M), groupdel(1M), groupmod(1M), logins(1M), passwd(4), shadow(4), useradd(1M),userdel(1M), usermod(1M)
Common man page ap"SCO OpenServer Release 5 to UnixWare 7 Migration Tools Release 1.0.0" available from http://www.sco.com/download For information see the Getting Started Guide at:
http://www2.sco.com/download_files/006-000-000DL/DL00600P000.html