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 1625005 - Document realmd.conf and how realmd reads the configuration
Summary: Document realmd.conf and how realmd reads the configuration
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: realmd
Version: 7.5
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Sumit Bose
QA Contact: sssd-qe
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks: 1747456
TreeView+ depends on / blocked
 
Reported: 2018-09-03 23:02 UTC by Erinn Looney-Triggs
Modified: 2020-09-29 20:35 UTC (History)
3 users (show)

Fixed In Version: realmd-0.16.1-12.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1747456 (view as bug list)
Environment:
Last Closed: 2020-09-29 20:35:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4014 0 None None None 2020-09-29 20:35:45 UTC

Description Erinn Looney-Triggs 2018-09-03 23:02:18 UTC
Description of problem:
There are mentions that /etc/realmd.conf can be used to fill in most of the information (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/windows_integration_guide/realmd-conf https://freedesktop.org/software/realmd/docs/realmd-conf.html) that can be put in on the command line. However, when running an strace on realm it never even seems to check that the file is there let alone open it. Does realmd.conf work? If not please fix it, if so and I am doing something wrong, can we please document how it should work?


Version-Release number of selected component (if applicable):
realmd-0.16.1-9.el7.x86_64

How reproducible:


Steps to Reproduce:
1. Create a /etc/realmd.conf with options
2. run realm join
3. Watch it ignore any of the options since it doesn't seem to open the file

Actual results:
Ignores and in fact doesn't even appear to open /etc/realmd.conf


Additional info:
ls -l /etc/realmd.conf 
-rw-r--r--. 1 root root 269 Sep  3 15:44 /etc/realmd.conf

cat /etc/realmd.conf
[active-directory]
default-client = winbind

[users]
default-home = /home/%U

[ad.colorado.edu]
computer-ou = OU=Computers,OU=OIT - UnixOps,OU=SIS,OU=ITS,OU=,DC=ad,DC=example,DC=com
automatic-id-mapping = no
fully-qualified-names = no

Comment 2 Sumit Bose 2018-09-04 07:44:40 UTC
Hi,

/etc/realmd.conf is not read by the realm command but by the realmd daemon at startup. There should be log messages in the journal or /var/log/meesages saying

    realmd[24457]: Loaded settings from: /usr/lib/realmd/realmd-defaults.conf /usr/lib/realmd/realmd-distro.conf

or 

    realmd[24539]: Loaded settings from: /usr/lib/realmd/realmd-defaults.conf /usr/lib/realmd/realmd-distro.conf /etc/realmd.conf

depending on the existence of /etc/realmd.conf

The realmd daemon is be default started automatically if there are some DBus request pending, typically send by the realm command, and it will also shutdown automatically after about 1 minute of inactivity. But if while editing options in /etc/realmd.conf you call the realm command again inside this timeout window the realmd daemon will still run with the old settings read at startup.

In this case you should stop or restart the realmd daemon after modifying /etc/realmd.conf with e.g. 'systemctl stop realmd' or wait until realmd was shut down automatically.

Please let me know if this helps to solve the issues you are seeing.

bye,
Sumit

Comment 3 Erinn Looney-Triggs 2018-09-04 21:53:00 UTC
Thanks systemctl realmd stop seems to do the trick. If possible can this information be documented in the man page, and the two aforementioned locations for future users?

-Erinn

Comment 4 Sumit Bose 2019-12-03 10:20:05 UTC
Upstream:
 - 98a69ca00e3441128b181b59c06bb06e8c362360

Comment 8 shridhar 2020-05-19 12:12:34 UTC
Tested with following data:

 ~]# rpm -q realmd
realmd-0.16.1-12.el7.x86_64


<snip>

REALMD.CONF(5)                                                                               File Formats                                                                               REALMD.CONF(5)

NAME
       realmd.conf - Tweak behavior of realmd

CONFIGURATION FILE
       realmd can be tweaked by network administrators to act in specific ways. This is done by placing settings in a /etc/realmd.conf. This file does not exist by default. The syntax of this file
       is the same as an INI file or Desktop Entry file. If the file is changed and realmd is running realmd must be restarted to read the new values.

       Only specify the settings you wish to override in the /etc/realmd.conf file. Settings not specified will be loaded from their packaged defaults which can be found in
       /usr/lib64/realmd/realmd-defaults.conf and /usr/lib64/realmd/realmd-distro.conf. Only override the settings below. You may find other settings if you look through the realmd source code.
       However these are not guaranteed to remain stable.

</snip>


Marking verified.

Comment 10 errata-xmlrpc 2020-09-29 20:35:34 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 (realmd bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2020:4014


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