Randy Morgan
CSR
Department of Chemistry and Biochemistry
Brigham Young University
801-422-4100
On 03/29/2018 08:34, Rob Crittenden wrote:
> Randy Morgan wrote:
>> Randy Morgan
>> CSR
>> Department of Chemistry and Biochemistry
>> Brigham Young University
>> 801-422-4100
>>
>> On 03/28/2018 13:19, Rob Crittenden wrote:
>>> Randy Morgan via FreeIPA-users wrote:
>>>> We have been working to get automounting working on RHEL 7.4
>>>> without any
>>>> success. I am including how the server has been built, ipa-client
>>>> installed and configured, etc. I will also include the relevant parts
>>>> of the logs.
>>>>
>>>> 1.
>>>> Install RHEL 7.4 or other required version
>>>> 2.
>>>> subscription-manager register
>>>> 3.
>>>> Type username and password
>>>> 4.
>>>> subscription-manager repos –enable=rhel-7-server-rpms
>>>> 5.
>>>> subscription-manager repos –enable=rhel-7-server-extras-rpms
>>>> 6.
>>>> subscription-manager repos –enable=rhel-7-server-optional-rpms
>>>> 7.
>>>> yum instll –y
>>>>
>>>>
http://dl.fedoraproject.org/pub/epel/x86_64/Packages/e/epel-release-7-11....
>>>>
>>>>
>>>> (or whatever the latest is)
>>>> 8.
>>>> yum update && install -y samba samba-client samba-common
>>>> cifs-utils
>>>> 9.
>>>> yum install –y ipa-client
>>>> 10.
>>>> yum update -y
>>>> 11.
>>>> install ipa-client: ipa-client-install –enable-dns-updates
>>>> –force-join –ssh-trust-dns –hostname <
host>.chem.byu.edu
>>>> –mkhomedir
>>>> 12.
>>>> ipa-client-automount –location=defualt
>>>> 13.
>>>> authconfig –enablemkhomedir –updateall
>>>> 14.
>>>> ipa-getkeytab -s
ipa1.chem.byu.edu -p
nfs/<host>.chem.byu.edu
-k
>>>> /etc/krb5.keytab
>>>> 15.
>>>> ipa-getkeytab -s
ipa1.chem.byu.edu -p
>>>>
cifs/<host>.chem.byu.edu -k
>>>> /etc/krb5.keytab
>>>>
>>>> After getting everything setup, when logging in with an IPA user
>>>> account
>>>> it acts like it is logging in but then immediately returns to the
>>>> login
>>>> page. Looking in the logs shows the following:
>>>>
>>>> Mar 27 12:33:41 jdmlab1 journal: g_task_return_error: assertion
'error
>>>> != NULL' failed
>>>> Mar 27 12:33:41 jdmlab1 journal: failed to set screen _ICC_PROFILE:
>>>> Failed to open file
>>>>
'/var/lib/gdm/.local/share/icc/edid-dcf60fecec69cef7bcda72bf1bbc37f5.icc':
>>>>
>>>>
>>>> Permission denied
>>>> Mar 27 12:33:41 jdmlab1 journal: failed to set screen _ICC_PROFILE:
>>>> Failed to open file
>>>>
'/var/lib/gdm/.local/share/icc/edid-dcf60fecec69cef7bcda72bf1bbc37f5.icc':
>>>>
>>>>
>>>> Permission denied
>>>> Mar 27 12:34:00 jdmlab1 systemd-logind: New session 3 of user randym.
>>>> Mar 27 12:34:00 jdmlab1 systemd: Started Session 3 of user randym.
>>>> Mar 27 12:34:00 jdmlab1 systemd: Starting Session 3 of user randym.
>>>> Mar 27 12:34:00 jdmlab1 oddjob-mkhomedir[4291]: error creating
>>>> /home/csr/randym: No such file or directory
>>>> Mar 27 12:34:04 jdmlab1 gnome-session: gnome-session-binary[4053]:
>>>> WARNING: Lost name on bus: org.gnome.SessionManager
>>>> Mar 27 12:34:04 jdmlab1 gnome-session-binary[4053]: WARNING: Lost name
>>>> on bus: org.gnome.SessionManager
>>>> Mar 27 12:34:04 jdmlab1 journal: Error releasing name
>>>> org.gnome.SettingsDaemon: The connection is closed
>>>> Mar 27 12:34:04 jdmlab1 journal: Invalid id 5 passed to
>>>> g_bus_unown_name()
>>>> Mar 27 12:34:04 jdmlab1 journal: failed to connect to device:
>>>> Failed to
>>>> connect to missing device
>>>>
/org/freedesktop/ColorManager/devices/xrandr_Dell_Inc__DELL_1800FP_7R47737N01PX_gdm_42
>>>>
>>>>
>>>> Mar 27 12:34:05 jdmlab1 gnome-session: gnome-session-binary[4338]:
>>>> WARNING: IceLockAuthFile failed: No such file or directory
>>>> Mar 27 12:34:05 jdmlab1 gnome-session-binary[4338]: WARNING:
>>>> IceLockAuthFile failed: No such file or directory
>>>>
>>>> The home directories are found on the fileserver, and are both NFS and
>>>> SMB mountable. We have successfully gotten this to work on RHEL 6.9,
>>>> and I believe on RHEL 7.2, but not on RHEL 7.4. Searching through the
>>>> relevant config files shows no differences in their configurations
>>>> between any of the different versions including 7.4.
>>> Does automount work for existing directories?
>> Automount does not work for existing directories, if they are not
>> local. It appears that it is trying to create a local directory in
>> /home/csr, for my user, which is a mirror of what is on the fileserver.
>> It doesn't actually copy the files, but makes the base directory. As we
>> have been digging into this we have discovered that this appears to be a
>> permissions issue. This is shown in the logs:
> You passed the --mkhomedir option to ipa-client-install which explains
> why it is trying to create directories (and that uses oddjob to do it).
>
> I'd suggest trying to simplify the problem and test the mounts directly
> as another user (say root), like cd /home/csr/randym). That should force
> automount to mount the dir.
>
> rob
We did pass the --mkhomedir because we want the users to have access to
their homedir when they login. Mounting the homedir requires the
creation of a local folder, just like any other nfs mount. I tried just
cd /home/csr/randym and it does not mount the dir, it does not even see
it, even if I do a kinit before hand. That is true of both root and
randym. I was not aware of the change from pam_mkhomedir to the oddjobd
until I started trying to figure out why this was not working.
So what you expect is that mkhomedir will create the mount point and
then NFS will mount the home directory on that? AFAIK this will not
work. You need to have the structure in place in advance (though I don't
believe the leaf directory in the case of users).
The same question came up last month,
>
>> Mar 28 14:34:42 jdmlab1 journal: D-Bus service launched with name:
>> net.reactivated.Fprint
>> Mar 28 14:34:42 jdmlab1 journal: entering main loop
>> Mar 28 14:34:42 jdmlab1 kernel: FS-Cache: Loaded
>> Mar 28 14:34:42 jdmlab1 kernel: FS-Cache: Netfs 'nfs' registered for
>> caching
>> Mar 28 14:34:42 jdmlab1 kernel: Key type dns_resolver registered
>> Mar 28 14:34:42 jdmlab1 kernel: NFS: Registering the id_resolver key
>> type
>> Mar 28 14:34:42 jdmlab1 kernel: Key type id_resolver registered
>> Mar 28 14:34:42 jdmlab1 kernel: Key type id_legacy registered
>> Mar 28 14:34:51 jdmlab1 dbus[2193]: [system] Activating service
>> name='org.fedoraproject.Setroubleshootd' (using servicehelper)
>> Mar 28 14:34:51 jdmlab1 systemd-logind: Failed to mount per-user tmpfs
>> directory /run/user/8142: Permission denied
>> Mar 28 14:34:51 jdmlab1 gnome-keyring-daemon[20103]: couldn't create
>> socket directory: No such file or directory
>> Mar 28 14:34:51 jdmlab1 gnome-keyring-daemon[20103]: couldn't bind to
>> control socket: /home/csr/randym/.cache/keyring-6tuN4S/control: No such
>> file or directory
>> Mar 28 14:34:52 jdmlab1 colord: device removed: xrandr-Dell Inc.-DELL
>> 1800FP-7R47737N01PX
>> Mar 28 14:34:52 jdmlab1 colord: Profile removed:
>> icc-523909406475d8b7f92f093531d0b19f
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession: mkdir: cannot create
>> directory âome/csr/randymâPermission denied
>> Mar 28 14:34:52 jdmlab1 dbus[2193]: [system] Successfully activated
>> service 'org.fedoraproject.Setroubleshootd'
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession: touch: cannot touch
>> âome/csr/randym/.cache/imsettings/logâNo such file or directo
>> y
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> Mar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>> ar 28 14:34:52 jdmlab1 /etc/gdm/Xsession:
>> /usr/libexec/imsettings-functions: line 37:
>> /home/csr/randym/.cache/imsettings/log: No such file or directory
>>
>> We have disabled selinux just to see if we can get around this issue and
>> it has not worked, we have also disabled firewalld. Right now this is a
>> test server so I am not concerned about these, but in a live environment
>> I would prefer selinux to be running.
>>
>> Using the commands listed in the beginning of this post, this works on
>> RHEL 6.9. The automount connects the home directory that is on the
>> fileserver and creates it as if it were a local directory that has r/w
>> permissions, but all data is actually stored on the fileserver, not the
>> local machine. I have rebuilt my test server back to RHEL 7.0 and we
>> are still encountering the same problem.
>>> Are you saying that in RHEL 7.2 and 6.9 you use oddjobd to
>>> automatically
>>> create new user directories on NFS mounts?
>> Not sure we are using addjobd, not familiar with it.
>>
>> Randy
>>> rob