Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 4. Migrating from NIS to Identity Management
A Network Information Service (NIS) server can contain information about users, groups, hosts, netgroups and automount maps. As a system administrator you can migrate these entry types, authentication, and authorization from NIS server to an Identity Management (IdM) server so that all user management operations are performed on the IdM server. Migrating from NIS to IdM will also allow you access to more secure protocols such as Kerberos.
4.1. Enabling NIS in IdM Copier lienLien copié sur presse-papiers!
To allow communication between NIS and Identity Management (IdM) server, you must enable NIS compatibility options on IdM server.
Prerequisites
- You have root access on IdM server.
Procedure
Enable the NIS listener and compatibility plug-ins on IdM server:
ipa-nis-manage enable ipa-compat-manage enable
[root@ipaserver ~]# ipa-nis-manage enable [root@ipaserver ~]# ipa-compat-manage enableCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: For a more strict firewall configuration, set a fixed port.
For example, to set the port to unused port
514:ldapmodify -x -D 'cn=directory manager' -W dn: cn=NIS Server,cn=plugins,cn=config changetype: modify add: nsslapd-pluginarg0 nsslapd-pluginarg0: 514
[root@ipaserver ~]# ldapmodify -x -D 'cn=directory manager' -W dn: cn=NIS Server,cn=plugins,cn=config changetype: modify add: nsslapd-pluginarg0 nsslapd-pluginarg0: 514Copy to Clipboard Copied! Toggle word wrap Toggle overflow WarningTo avoid conflict with other services do not use any port number above 1024.
Enable and start the port mapper service:
systemctl enable rpcbind.service systemctl start rpcbind.service
[root@ipaserver ~]# systemctl enable rpcbind.service [root@ipaserver ~]# systemctl start rpcbind.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart Directory Server:
systemctl restart dirsrv.target
[root@ipaserver ~]# systemctl restart dirsrv.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2. Migrating user entries from NIS to IdM Copier lienLien copié sur presse-papiers!
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 Identity Management (IdM):
Prerequisites
- You have root access on NIS server.
- NIS is enabled in IdM.
- The NIS server is enrolled into IdM.
- You have ID ranges that can store UIDs of importing users.
Procedure
Install the
yp-toolspackage:dnf install yp-tools -y
[root@nis-server ~]# dnf install yp-tools -yCopy to Clipboard Copied! Toggle word wrap Toggle overflow On the NIS server 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-server.example.com
[root@nis-server ~]# sh /root/nis-users.sh nisdomain nis-server.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantThis script uses hard-coded values for first name, last name, and sets the password to
passw0rd1. The user must change the temporary password at the next login.
4.3. Migrating user group from NIS to IdM Copier lienLien copié sur presse-papiers!
The NIS group map contains information about groups, such as group names, GIDs, or group members. Use this data to migrate NIS groups to Identity Management (IdM):
Prerequisites
- You have root access on NIS server.
- NIS is enabled in IdM.
- The NIS server is enrolled into IdM.
Procedure
Install the
yp-toolspackage:dnf install yp-tools -y
[root@nis-server ~]# dnf install yp-tools -yCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
/root/nis-groups.shscript with the following content on the NIS server:Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteMake sure your usernames do not contain any special characters to ensure successful migration of the user group.
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-server.example.com
[root@nis-server ~]# sh /root/nis-groups.sh nisdomain nis-server.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.4. Migrating host entries from NIS to IdM Copier lienLien copié sur presse-papiers!
The NIS hosts map contains information about hosts, such as host names and IP addresses. Use this data to migrate NIS host entries to Identity Management (IdM):
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.
Prerequisites
- You have root access on NIS server.
- NIS is enabled in IdM.
- The NIS server is enrolled into IdM.
Procedure
Install the
yp-toolspackage:dnf install yp-tools -y
[root@nis-server ~]# dnf install yp-tools -yCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
/root/nis-hosts.shscript with the following content on the NIS server: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-server.example.com
[root@nis-server ~]# sh /root/nis-hosts.sh nisdomain nis-server.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThis script does not migrate special host configurations, such as aliases.
4.5. Migrating netgroup entries from NIS to IdM Copier lienLien copié sur presse-papiers!
The NIS netgroup map contains information about netgroups. Use this data to migrate NIS netgroups to Identity Management (IdM):
Prerequisites
- You have root access on NIS server.
- NIS is enabled in IdM.
- The NIS server is enrolled into IdM.
Procedure
Install the
yp-toolspackage:dnf install yp-tools -y
[root@nis-server ~]# dnf install yp-tools -yCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
/root/nis-netgroups.shscript with the following content on the NIS server: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-server.example.com
[root@nis-server ~]# sh /root/nis-netgroups.sh nisdomain nis-server.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.6. Migrating automount maps from NIS to IdM Copier lienLien copié sur presse-papiers!
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 Identity Management (IdM):
Prerequisites
- You have root access on NIS server.
- NIS is enabled in IdM.
- The NIS server is enrolled into IdM.
Procedure
Install the
yp-toolspackage:dnf install yp-tools -y
[root@nis-server ~]# dnf install yp-tools -yCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
/root/nis-automounts.shscript with the following content on the NIS server:Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe 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.
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-server.example.com map_name[root@nis-server ~]# sh /root/nis-automounts.sh location nisdomain nis-server.example.com map_nameCopy to Clipboard Copied! Toggle word wrap Toggle overflow