Questo contenuto non è disponibile nella lingua selezionata.
21.5. Migrating from NIS to IdM
Migrating from an existing NIS server to Identity Management (IdM) requires the following steps:
21.5.1. Preparing Netgroup Entries in IdM Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
Before migrating, identify what kind of identities are being managed in the current NIS server:
- User Entries
- Determine what applications are using the user information provided by NIS. While some utilities, such as sudo, require NIS netgroups, several others can use regular UNIX groups.To migrate:
- Create the corresponding user accounts in IdM. See Section 21.5.3.1, “Migrating User Entries”.
- If you additionally require netgroups:
- Add the netgroups. See Section 21.3.1, “Adding a Netgroup”.
- Add the users to the netgroups. See Section 21.5.3.4, “Migrating Netgroup Entries”.
- Host Entries
- When you create a host group in IdM, a corresponding shadow NIS group is automatically created. Do not use the ipa netgroup-* commands on these shadow NIS groups. Use the ipa netgroup-* commands only to manage native netgroups created via the netgroup-add command.
- For a Direct Conversion
- If every user and host entry must use the same name, you can create the entries using the same names in IdM:
- Create an entry for every user referenced in a netgroup.
- Create an entry for every host referenced in a netgroup.
- Create a netgroup with the same name as the original netgroup.
- Add the users and hosts as direct members of the netgroup. If the users and hosts are members of groups or host groups, you can alternatively add these groups to the netgroup.
21.5.2. Enabling the NIS Listener in Identity Management Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
21.5.3. Exporting and Importing the Existing NIS Data Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
A NIS server can contain information about users, groups, hosts, netgroups, and automount maps. You can migrate these entry types to IdM.
In the following sections, we export the data from the current NIS server using the ypcat command, and use the output to import the entries to IdM using the corresponding ipa *-add commands.
- Make sure you install the
yp-toolspackage, since it provides the ypcat command used in the migration script:yum install yp-tools -y
[root@nis-server ~]# yum install yp-tools -yCopy to Clipboard Copied! Toggle word wrap Toggle overflow
21.5.3.1. Migrating User Entries Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
The NIS
passwd map contains information about users, such as names, UIDs, primary group, GECOS, shell, and home directory. Use this data to migrate NIS user accounts to IdM:
- Optional: If you require weak password support, see Section 21.5.4, “Enabling Weak Password Hashing for NIS User Authentication”.
- Create the
/root/nis-users.shscript with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Authenticate as the IdM
adminuser:kinit admin
[root@nis-server ~]# kinit adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the script. For example:
sh /root/nis-users.sh nisdomain nis-master.example.com
[root@nis-server ~]# sh /root/nis-users.sh nisdomain nis-master.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThis script uses hard-coded values for first name, last name, and sets the password topassw0rd1. The user must change the temporary password at the next log in.
21.5.3.2. Migrating Group Entries Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
The NIS
group map contains information about groups, such as group names, GIDs, or group members. Use this data to migrate NIS groups to IdM:
- Create the
/root/nis-groups.shscript with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Authenticate as the IdM
adminuser:kinit admin
[root@nis-server ~]# kinit adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the script. For example:
sh /root/nis-groups.sh nisdomain nis-master.example.com
[root@nis-server ~]# sh /root/nis-groups.sh nisdomain nis-master.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow
21.5.3.3. Migrating Host Entries Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
The NIS
hosts map contains information about hosts, such as host names and IP addresses. Use this data to migrate NIS host entries to IdM:
- Create the
/root/nis-hosts.shscript with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Authenticate as the IdM
adminuser:kinit admin
[root@nis-server ~]# kinit adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the script. For example:
sh /root/nis-hosts.sh nisdomain nis-master.example.com
[root@nis-server ~]# sh /root/nis-hosts.sh nisdomain nis-master.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThis script does not migrate special host configurations, such as aliases.
21.5.3.4. Migrating Netgroup Entries Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
The NIS
netgroup map contains information about netgroups. Use this data to migrate NIS netgroups to IdM:
- Create the
/root/nis-netgroups.shscript with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Authenticate as the IdM
adminuser:kinit admin
[root@nis-server ~]# kinit adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the script. For example:
sh /root/nis-netgroups.sh nisdomain nis-master.example.com
[root@nis-server ~]# sh /root/nis-netgroups.sh nisdomain nis-master.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow
21.5.3.5. Migrating Automount Maps Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
Automount maps are a series of nested and interrelated entries that define the location (the parent entry), the associated keys, and maps. To migrate NIS automount maps to IdM:
- Create the
/root/nis-automounts.shscript with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The script exports the NIS automount information, generates an LDAP Data Interchange Format (LDIF) for the automount location and associated map, and imports the LDIF file into the IdM Directory Server. For further details, see Section 21.4, “Exposing Automount Maps to NIS Clients”. - Authenticate as the IdM
adminuser:kinit admin
[root@nis-server ~]# kinit adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the script. For example:
sh /root/nis-automounts.sh location nisdomain \ nis-master.example.com map_name[root@nis-server ~]# sh /root/nis-automounts.sh location nisdomain \ nis-master.example.com map_nameCopy to Clipboard Copied! Toggle word wrap Toggle overflow
21.5.4. Enabling Weak Password Hashing for NIS User Authentication Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
Using the Directory Server component's default setting, passwords stored in the
userPassword attribute are hashed using the salted secure hash algorithm (SSHA). If your NIS clients require a weak hashing algorithm for passwords, update the password storage scheme setting.
Enabling a weak password hashing scheme affects only passwords stored in
userPassword attribute. Note that Kerberos does not use this attribute and therefore Kerberos encryption is not affected by this setting.
For example, to enable
CRYPT hashed passwords:
ldapmodify -D "cn=Directory Manager" -W -p 389 -h ipaserver.example.com -x
[root@server ~]# ldapmodify -D "cn=Directory Manager" -W -p 389 -h ipaserver.example.com -x
dn: cn=config
changetype: modify
replace: passwordStorageScheme
passwordStorageScheme: crypt
Note
Because password hashes cannot be decrypted, Directory Server does not convert existing password hashes. The server applies the new password storage only to passwords set after you changed the storage scheme.