ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    FreeIPA Automounting NFS

    IT Discussion
    4
    20
    12.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      https://mangolassi.it/topic/7672/mounting-an-nfs-home-share-on-centos-7-clients

      1 Reply Last reply Reply Quote 0
      • AlyRagabA
        AlyRagab @scottalanmiller
        last edited by

        @scottalanmiller i have installed the autofs package then run

        ipa-client-automount --location=default
        
        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller
          last edited by

          I don't know how the IPA client handles that.

          1 Reply Last reply Reply Quote 0
          • stacksofplatesS
            stacksofplates @AlyRagab
            last edited by

            @AlyRagab said in FreeIPA Automounting NFS:

            Dears,
            i have FreeIPA System installed in CentOS 7 and FreeIPA Client in Ubuntu 14.04 all users authentication works very well but i have a problem in the automount of the home directory.
            the FreeIPA Server works also as NFS Server and it exports " /exports/home" for the user's home directory location.
            i have added the NFS to the ipa services through the command line without any problem.
            would any one advice me the details of getting the automounting works fine 🙂

            Where is your automount location on the client end? It's best to put them under a sub-directory of /home (like /home/ipausers). Can you paste in your automount configs from the IPA interface?

            AlyRagabA 1 Reply Last reply Reply Quote 0
            • AlyRagabA
              AlyRagab @stacksofplates
              last edited by

              @stacksofplates said in FreeIPA Automounting NFS:

              @AlyRagab said in FreeIPA Automounting NFS:

              Dears,
              i have FreeIPA System installed in CentOS 7 and FreeIPA Client in Ubuntu 14.04 all users authentication works very well but i have a problem in the automount of the home directory.
              the FreeIPA Server works also as NFS Server and it exports " /exports/home" for the user's home directory location.
              i have added the NFS to the ipa services through the command line without any problem.
              would any one advice me the details of getting the automounting works fine 🙂

              Where is your automount location on the client end? It's best to put them under a sub-directory of /home (like /home/ipausers). Can you paste in your automount configs from the IPA interface?

              the location of the client is /ipausers , would you please show me an example of the automount configs from the IPA Web Interface 🙂

              1 Reply Last reply Reply Quote 0
              • stacksofplatesS
                stacksofplates
                last edited by stacksofplates

                Ok sorry for the long delay. I had to spin up a new IPA server since I don't have one running at home any more. Here's how the configs will work.

                Initial indirect mount set up:

                0_1483057624635_autohomesetup.png

                List of mounts:

                0_1483057649008_list.png

                Under auto.home, here is the key setup:

                0_1483057671999_keys.png

                The * and & are wildcards and it will search the NFS export for the username you are logged in with and replace the & with it.

                The home directory for the user needs to be set to use the automount:

                0_1483057836721_home.png

                AlyRagabA 1 Reply Last reply Reply Quote 1
                • stacksofplatesS
                  stacksofplates
                  last edited by stacksofplates

                  Since I'm using Puppet/Ansible, I don't really rely on the autofs setup from LDAP any longer. They don't change that often, so I just use the files. Puppet sticks all of my configs in the dump directory (auto.master.d) and adds the auto.whatever files in /etc for me. If there is a change, it will restart the autofs service automatically. The files seem to be more reliable than pulling from LDAP, but that's just anecdotal.

                  1 Reply Last reply Reply Quote 1
                  • AlyRagabA
                    AlyRagab @stacksofplates
                    last edited by

                    @stacksofplates said in FreeIPA Automounting NFS:

                    Ok sorry for the long delay. I had to spin up a new IPA server since I don't have one running at home any more. Here's how the configs will work.

                    Initial indirect mount set up:

                    0_1483057624635_autohomesetup.png

                    List of mounts:

                    0_1483057649008_list.png

                    Under auto.home, here is the key setup:

                    0_1483057671999_keys.png

                    The * and & are wildcards and it will search the NFS export for the username you are logged in with and replace the & with it.

                    The home directory for the user needs to be set to use the automount:

                    0_1483057836721_home.png

                    Thank you so much , i have configured the IPA Server as you did , but in the Ubuntu client when i run the command

                    ipa-client-automount
                    

                    i have the below error :

                    root@cs1:~# ipa-client-automount
                    Searching for IPA server...
                    IPA server: [u'ipa.server.local']
                    Location: default
                    Continue to configure the system with these values? [no]: yes
                    Configured /etc/nsswitch.conf
                    Configured /etc/default/nfs-common
                    Configured /etc/idmapd.conf
                    rpcidmapd failed to restart: Command '/usr/sbin/service rpcidmapd restart '       returned non-zero exit status 1
                    rpcgssd failed to restart: Command '/usr/sbin/service rpcgssd restart ' returned     non-zero exit status 1
                    Restarting sssd, waiting for it to become available.
                    Started autofs
                    
                    AlyRagabA 1 Reply Last reply Reply Quote 0
                    • AlyRagabA
                      AlyRagab @AlyRagab
                      last edited by

                      @AlyRagab i also edited the /etc/nsswitch as " automount: files sss "
                      but the same problem , even i use the normal autofs configuration in ubuntu i could not automount the home directory.

                      stacksofplatesS 1 Reply Last reply Reply Quote 0
                      • stacksofplatesS
                        stacksofplates @AlyRagab
                        last edited by stacksofplates

                        @AlyRagab said in FreeIPA Automounting NFS:

                        @AlyRagab i also edited the /etc/nsswitch as " automount: files sss "
                        but the same problem , even i use the normal autofs configuration in ubuntu i could not automount the home directory.

                        After setting the local files did you restart rpcidmapd and rpcgssd?

                        You might have to set the automount to mount NFS version 3. I set up authentication once for an Ubuntu machine but not automounting. Everything I have is RHEL.

                        If you can't get the files working either I'd suspect it's something to do with Ubuntu.

                        If you're not using krb5p or krb5i you could just tell it to use NFS version 3 by default.

                        AlyRagabA 1 Reply Last reply Reply Quote 0
                        • AlyRagabA
                          AlyRagab @stacksofplates
                          last edited by

                          @stacksofplates said in FreeIPA Automounting NFS:

                          @AlyRagab said in FreeIPA Automounting NFS:

                          @AlyRagab i also edited the /etc/nsswitch as " automount: files sss "
                          but the same problem , even i use the normal autofs configuration in ubuntu i could not automount the home directory.

                          After setting the local files did you restart rpcidmapd and rpcgssd?

                          You might have to set the automount to mount NFS version 3. I set up authentication once for an Ubuntu machine but not automounting. Everything I have is RHEL.

                          If you can't get the files working either I'd suspect it's something to do with Ubuntu.

                          If you're not using krb5p or krb5i you could just tell it to use NFS version 3 by default.

                          i could not find the rpcidmapd and rpcgssd services
                          also i can mount the NFS share manually without any problem!

                          stacksofplatesS 1 Reply Last reply Reply Quote 0
                          • stacksofplatesS
                            stacksofplates @AlyRagab
                            last edited by

                            @AlyRagab said in FreeIPA Automounting NFS:

                            @stacksofplates said in FreeIPA Automounting NFS:

                            @AlyRagab said in FreeIPA Automounting NFS:

                            @AlyRagab i also edited the /etc/nsswitch as " automount: files sss "
                            but the same problem , even i use the normal autofs configuration in ubuntu i could not automount the home directory.

                            After setting the local files did you restart rpcidmapd and rpcgssd?

                            You might have to set the automount to mount NFS version 3. I set up authentication once for an Ubuntu machine but not automounting. Everything I have is RHEL.

                            If you can't get the files working either I'd suspect it's something to do with Ubuntu.

                            If you're not using krb5p or krb5i you could just tell it to use NFS version 3 by default.

                            i could not find the rpcidmapd and rpcgssd services
                            also i can mount the NFS share manually without any problem!

                            On my way home. I'llbe able to reply when I'm not driving.

                            1 Reply Last reply Reply Quote 0
                            • stacksofplatesS
                              stacksofplates
                              last edited by

                              So first I'd run

                              ipa-client-automount --uninstall
                              

                              Then I'd set the configs like this:

                              auto.master

                               /home/ipa          /etc/auto.home
                              

                              auto.home

                              *                   nfsserver:/<path-for-user-dir>/&
                              

                              Then restart autofs

                              systemctl restart autofs
                              
                              1 Reply Last reply Reply Quote 1
                              • AlyRagabA
                                AlyRagab
                                last edited by

                                i have tested it using Fedora and everything is working fine without any kind of troubleshooting , so why ubuntu is not simple as Fedora ?!!

                                stacksofplatesS 1 Reply Last reply Reply Quote 1
                                • stacksofplatesS
                                  stacksofplates @AlyRagab
                                  last edited by

                                  @AlyRagab said in FreeIPA Automounting NFS:

                                  i have tested it using Fedora and everything is working fine without any kind of troubleshooting , so why ubuntu is not simple as Fedora ?!!

                                  Ha that's a good question. I stick with RHEL based products when I can.

                                  AlyRagabA 1 Reply Last reply Reply Quote 1
                                  • AlyRagabA
                                    AlyRagab @stacksofplates
                                    last edited by

                                    @stacksofplates said in FreeIPA Automounting NFS:

                                    @AlyRagab said in FreeIPA Automounting NFS:

                                    i have tested it using Fedora and everything is working fine without any kind of troubleshooting , so why ubuntu is not simple as Fedora ?!!

                                    Ha that's a good question. I stick with RHEL based products when I can.

                                    i am planning from now to get rid of Ubuntu and use Fedora for Hosts and i am already work with CentOS 🙂

                                    scottalanmillerS 1 Reply Last reply Reply Quote 3
                                    • scottalanmillerS
                                      scottalanmiller @AlyRagab
                                      last edited by

                                      @AlyRagab said in FreeIPA Automounting NFS:

                                      @stacksofplates said in FreeIPA Automounting NFS:

                                      @AlyRagab said in FreeIPA Automounting NFS:

                                      i have tested it using Fedora and everything is working fine without any kind of troubleshooting , so why ubuntu is not simple as Fedora ?!!

                                      Ha that's a good question. I stick with RHEL based products when I can.

                                      i am planning from now to get rid of Ubuntu and use Fedora for Hosts and i am already work with CentOS 🙂

                                      CentOS / RHEL user here too.

                                      1 Reply Last reply Reply Quote 0
                                      • JaredBuschJ
                                        JaredBusch
                                        last edited by

                                        The only Ubuntu system I have is my UniFi controller

                                        1 Reply Last reply Reply Quote 2
                                        • 1 / 1
                                        • First post
                                          Last post