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 1232468 - The Domain option is not correctly set in idmapd.conf when ipa-client-automount is executed.
Summary: The Domain option is not correctly set in idmapd.conf when ipa-client-automou...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks: 1295865
TreeView+ depends on / blocked
 
Reported: 2015-06-16 20:13 UTC by Matthew LeSieur
Modified: 2016-05-11 00:07 UTC (History)
7 users (show)

Fixed In Version: ipa-3.0.0-49.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1295865 (view as bug list)
Environment:
Last Closed: 2016-05-11 00:07:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2112761 0 None None None 2016-01-05 16:24:07 UTC
Red Hat Product Errata RHBA-2016:0874 0 normal SHIPPED_LIVE ipa bug fix update 2016-05-10 22:47:49 UTC

Internal Links: 1341702

Description Matthew LeSieur 2015-06-16 20:13:22 UTC
Description of problem:
  When using "ipa-client-automount" to configure automount and NFS on an IPA client, the "Domain" option is added to the bottom of the /etc/idmapd.conf file.  Because this file is formatted into sections, the "Domain" option is placed in the [Translation] section, and not the [General] section of the configuration file.  ID mapping does not work correctly with the "Domain" option in the [Translation] section.  After manually moving the "Domain" option to the [General] section, ID mapping works correctly.

Version-Release number of selected component (if applicable):
ipa-client-3.0.0-42.el6.x86_64
nfs-utils-lib-1.1.5-9.el6.x86_64

How reproducible:
  This is reproducible every time "ipa-client-automount" is executed and /etc/idmapd.conf is modified.

Steps to Reproduce:
1. Install a fresh Red Hat Enterprise Linux 6 host and apply all updates.
2. Install the "ipa-client" package.
3. Join host to IPA domain using "ipa-client-install".
4. Configure automount and NFS using "ipa-client-automount".

Actual results:
# ipa-client-automount --server rhidm.example.com --location default
IPA server: rhidm.example.com
Location: default
Continue to configure the system with these values? [no]: yes
Configured /etc/nsswitch.conf
Configured /etc/sysconfig/nfs
Configured /etc/idmapd.conf
Started rpcidmapd
Started rpcgssd
Restarting sssd, waiting for it to become available.
Started autofs

# ls -l /net/nfs-server.example.com/nfsvol/
total 156
drwx------.  8 nobody nobody  4096 May 21  2013 user1
drwx--x--x. 16 nobody nobody  4096 Feb  9 08:56 user2
drwx------.  2 nobody nobody  4096 Apr  6 11:10 user3
drwx------.  2 nobody nobody  4096 Oct  5  2012 user4
drwx------.  2 nobody nobody  4096 Oct  5  2012 user5

# cat /etc/idmapd.conf | awk '$0 ~ /^#|^$/ { next } { print }'
[General]
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
[Translation]
Method = nsswitch
Domain=rhidm.bor.ct.edu

Expected results:
# ipa-client-automount --server rhidm.example.com --location default
IPA server: rhidm.example.com
Location: default
Continue to configure the system with these values? [no]: yes
Configured /etc/nsswitch.conf
Configured /etc/sysconfig/nfs
Configured /etc/idmapd.conf
Started rpcidmapd
Started rpcgssd
Restarting sssd, waiting for it to become available.
Started autofs

# ls -l /net/nfs-server.example.com/nfsvol/
total 156
drwx------.  8 user1 user1  4096 May 21  2013 user1
drwx--x--x. 16 user2 user2  4096 Feb  9 08:56 user2
drwx------.  2 user3 user3  4096 Apr  6 11:10 user3
drwx------.  2 user4 user4  4096 Oct  5  2012 user4
drwx------.  2 user5 user5  4096 Oct  5  2012 user5

# cat /etc/idmapd.conf | awk '$0 ~ /^#|^$/ { next } { print }'
[General]
Domain=rhidm.bor.ct.edu
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
[Translation]
Method = nsswitch

Additional info:
 Before fixing /etc/idmapd.conf, several "mapping" errors are logged into /var/log/messages: 

Jun 16 16:03:50 example nfsidmap[2624]: nss_getpwnam: name ‘user1.com' does not map into domain 'example.com'
Jun 16 16:03:50 example nfsidmap[2626]: nss_getpwnam: name ‘user2.com' does not map into domain 'example.com'
Jun 16 16:03:50 example nfsidmap[2628]: nss_getpwnam: name ‘user3.com' does not map into domain 'example.com'
Jun 16 16:03:50 example nfsidmap[2630]: nss_getpwnam: name ‘user4.com' does not map into domain 'example.com'

Comment 2 Petr Vobornik 2015-06-17 10:28:53 UTC
Thanks for reporting this bug.

I'm able to reproduce it even with the development version of FreeIPA.

Note: Domain is configured correctly(replaced) if /etc/idmapd.conf already contains a domain configuration in general section.

Comment 3 Petr Vobornik 2015-06-17 10:30:13 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/5069

Comment 4 Matthew LeSieur 2015-06-17 13:54:36 UTC
Petr,
  Your observation about ipa-client-automount correctly replacing an existing Domain option in /etc/idmapd.conf leads to a good workaround.  Before executing ipa-client-automount, uncomment the Domain option.  I verified this works after a fresh installation of RHEL 6.  Uncommenting the Domain option first does not require restarting rpc.idmapd or clearing out the rpc.idmapd cache on the client or server (nfsidmap -vc) after fixing the Domain option.

# mv /etc/idmapd.conf /etc/idmapd.conf-orig
# awk '$0 ~ /^#Domain/ { gsub(/^#/, "") }{ print }' < /etc/idmapd.conf-orig > /etc/idmapd.conf
# ipa-client-automount --server rhidm.example.com --location default

Thanks
Matt LeSieur

Comment 9 Varun Mylaraiah 2016-02-17 17:04:46 UTC
Verified
ipa-client-3.0.0-50.el6.x86_64


[root@blade04 ~]# cat /etc/idmapd.conf | awk '$0 ~ /^#|^$/ { next } { print }'
[General]
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
[Translation]
Method = nsswitch


[root@blade04 ~]# ipa-client-automount --server blade01.testrelm.test --location default
IPA server: blade01.testrelm.test
Location: default
Continue to configure the system with these values? [no]: yes
Configured /etc/nsswitch.conf
Configured /etc/sysconfig/nfs
Configured /etc/idmapd.conf
Started rpcidmapd
Started rpcgssd
Restarting sssd, waiting for it to become available.


[root@blade04 ~]# cat /etc/idmapd.conf | awk '$0 ~ /^#|^$/ { next } { print }'
[General]
Domain = testrelm.test
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
[Translation]
Method = nsswitch

Comment 11 errata-xmlrpc 2016-05-11 00:07:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0874.html


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