RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 801553 - IPA NIS Integration and Migration documentation updates
Summary: IPA NIS Integration and Migration documentation updates
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Identity_Management_Guide
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 6.3
Assignee: Deon Ballard
QA Contact: ecs-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-08 20:18 UTC by Scott Poore
Modified: 2012-06-21 23:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-21 23:15:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Scott Poore 2012-03-08 20:18:11 UTC
This is a request to update the EIM Guide with more info on NIS Migration.  

I have a test script that Rob Crittenden though would be a good starting point for Migration.  Whoever will update the document can contact me directly for more information.   

Below is a rough draft summary of the steps used in the script for importing NIS data:

1.  setup IPA server per standard guide instructions

Follow standard documentation using ipa-server-install here.

2.  enable NIS Listener

ipa-compat-manage enable
ipa-nis-manage enable
service rpcbind restart
service dirsrv restart

3.  import user data from NIS passwd map

ypcat -d <NISDOMAIN> -h <NISMASTER> passwd

Loop through output parsing and processing each entry:

echo <firstpassword>|ipa user-add <username> --first=NIS --last=USER --password

ipa user-mod <username> --gidnumber=<gid> --uid=<uid> --gecos=<gecos> --homedir=<homedir> --shell=<shell>

* Note that user-add --first=NIS and --last=USER can be replaced by more complex/custom logic to process gecos field into First and Last Name fields.

4.  import group data from NIS group map

ypcat -d <NISDOMAIN> -h <NISMASTER> group

loop through output parsing and processing each entry:

skip user private groups already created by ipa user-add

ipa group-add <groupname> --desc=NIS_GROUP_<groupname> --gid=<gid>

ipa group-add-member <groupname> --users=<users>

5.  import host data from NIS hosts map

ypcat -d <NISDOMAIN> -h <NISMASTER> hosts

loop through output parsing and processing each entry:

create reverse (PTR) zones (e.g. 0.168.192.in-addr.arpa.) for new networks
ipa dnszone-add <ptrzone> --name-server=<IPAMASTER> --admin-email=<emailaddress>

create forward zones for new DNS domains to be supported.
ipa dnszone-add <domainname> --name-server=<IPAMASTER> --admin-email=<emailaddress>

add host entry
ipa host-add <fqdn> --ip-address=<ip>

6.  import netgroup data from NIS netgroup map

ypcat -k -d <NISDOMAIN> -h <NISMASTER> netgroup 

loop through output parsing and processing each entry:
ipa netgroup-add <netgroupname> --desc=NIS_NG_<netgroupname>

if entry contains empty host field in triple "(,":
ipa netgroup-mod <netgroupname> --hostcat=all

if entry contains empty user field in triple ",,",:
ipa netgroup-mod <netgroupname> --usercat=all

loop through the netgroups/triples included in the netgroup:

if included entry is netgroup that doesn't already exist:
ipa netgroup-add <includednetgroup> --desc=NIS_NG_<includednetgroup>

add included netgroup
ipa netgroup-add-member <netgroupname> --netgroups=<includednetgroup>

if include entry is triple, parse and add based on host/user/domain fields
ipa negroup-add-member <netgroupname> --hosts=<host> --users=<user> --nisdomain=<domain>

7.  import automount data from NIS automount maps

create automount location to use for your nis domain
ipa automountlocation-add nis
ypcat -k -d <NISDOMAIN> -h <NISMASTER> auto.master

loop through output to get list of maps to configure and include auto.master in maps to process:
ypcat -k -d <NISDOMAIN> -h <NISMASTER> <MAP>
ipa automountmap-add nis <MAP>
cat <<EOF > /tmp/amap.ldif
dn: nis-domain=testrelm.com+nis-map=$MAP,cn=NIS Server,cn=plugins,cn=config
objectClass: extensibleObject
nis-domain: $DOMAIN
nis-map: $MAP
nis-base: automountmapname=$MAP,cn=nis,cn=automount,$BASEDN
nis-filter: (objectclass=*)
nis-key-format: %{automountKey}
nis-value-format: %{automountInformation}       
EOF
ldapadd -x -h <MASTER> -D "<ROOTDN>" -w "<ROOTDNPASSWORD> -f /tmp/amap.ldif

loop through parsing and processing each automount entry in <MAP>
ipa automountkey-add nis <MAP> --key=<key> --info=<mountinfo>

Comment 3 Deon Ballard 2012-05-03 16:34:58 UTC
Setting all priority and severity to medium.

Comment 4 Deon Ballard 2012-05-03 18:13:30 UTC
Scott sent me his test scripts, which I have added as examples for the different 7.5.x migration areas.
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6-Beta/html/Identity_Management_Guide/migrating-from-nis.html#nis-migr-importing-data

Comment 6 Deon Ballard 2012-06-21 23:15:48 UTC
Closing.


Note You need to log in before you can comment on or make changes to this bug.