NIS to IPA user migration script (nis-users.sh) adds incorrect value for GECOS field in user's LDAP entry

Solution Verified - Updated -

Issue

  • NIS to IPA user migration script nis-users.sh adds incorrect value for GECOS field in user's LDAP entry in IPA:
[root@ipaserver-rh8 ~]# cat /tmp/nis-map.passwd 
nisuser:x:10001:10002:NIS User Test:/home/nisuser:/bin/bash  <---- 

[root@ipaserver-rh8 ~]# sh  /root/nis-users.sh
--------------------
Added user "nisuser"
--------------------
  User login: nisuser
  First name: NIS
  Last name: USER
  Full name: NIS USER
  Display name: NIS USER
  Initials: NU
  Home directory: /home/nisuser
  GECOS: $gecos  <---- Actual value is not added
  Login shell: /bin/bash
  Principal name: nisuser@EXAMPLE.LOCAL
  Principal alias: nisuser@EXAMPLE.LOCAL
  User password expiration: 20230203062845Z
  Email address: nisuser@example.local
  UID: 10001
  GID: 10002
  Password: True
  Member of groups: ipausers
  Kerberos keys available: True
  User login: nisuser
  First name: NIS
  Last name: USER
  Home directory: /home/nisuser
  Login shell: /bin/bash
  Principal name: nisuser@EXAMPLE.LOCAL
  Principal alias: nisuser@EXAMPLE.LOCAL
  Email address: nisuser@example.local
  UID: 10001
  GID: 10002
  Account disabled: False
  Password: True
  Member of groups: ipausers
  Kerberos keys available: True

Environment

  • Red Hat Enterprise Linux 8
  • Identity Management (IPA/IdM)
  • NIS

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content