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

    NIS and NFS and YP in Ubuntu Server 14.04

    IT Discussion
    linux ubuntu nis nfs unix
    3
    29
    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.
    • LakshmanaL
      Lakshmana
      last edited by

      I have to configure NIS and NFS for one MAster Server and other slave servers also.How to configure it?I have installed the portmap nis as mentioned above

      scottalanmillerS 1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller @Lakshmana
        last edited by

        @Lakshmana said:

        I have to configure NIS and NFS for one MAster Server and other slave servers also.How to configure it?I have installed the portmap nis as mentioned above

        Does this guide work to get you started?

        http://www.server-world.info/en/note?os=Ubuntu_12.04&p=nis&f=2

        1 Reply Last reply Reply Quote 1
        • LakshmanaL
          Lakshmana
          last edited by

          I have tried to configure by the above method yesterday,there are some errors came in the process which was present in that website.

          For me some errors are coming in the process,I followed from the above website

          1 Reply Last reply Reply Quote 0
          • Reid CooperR
            Reid Cooper
            last edited by

            Can you tell us what those errors are?

            1 Reply Last reply Reply Quote 0
            • LakshmanaL
              Lakshmana
              last edited by

              sysv-rc-conf ypbind on

              Line does not exists in my server.Why?

              1 Reply Last reply Reply Quote 0
              • LakshmanaL
                Lakshmana
                last edited by

                now installed the above thing but the error i face after installation is given below

                shiva@ubuntu:~$ sysv-rc-conf ypbind on
                Can't create /var/lib/sysv-rc-conf : Permission denied at /usr/sbin/sysv-rc-conf line 454.

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • LakshmanaL
                  Lakshmana
                  last edited by Lakshmana

                  I have followed the website given below but no use in configuration

                  http://www.server-world.info/en/note?os=Ubuntu_13.04&p=nis&f=2

                  1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @Lakshmana
                    last edited by

                    @Lakshmana said:

                    now installed the above thing but the error i face after installation is given below

                    shiva@ubuntu:~$ sysv-rc-conf ypbind on
                    Can't create /var/lib/sysv-rc-conf : Permission denied at /usr/sbin/sysv-rc-conf line 454.

                    You forgot the "sudo" before that line.

                    1 Reply Last reply Reply Quote 0
                    • LakshmanaL
                      Lakshmana
                      last edited by

                      NOw NFS configured and tested but there is an issue in the NIS configuration only and the NIS server has issue given below

                      root@ubuntu:/var/yp# service ypbind start
                      start: Job failed to start

                      NIS client has issue as given below

                      root@client:~# ypdomainname
                      test
                      root@client:~# ypcat passwd
                      No such map passwd.byname. Reason: Can't bind to server which serves this domain
                      root@client:~# ypcat hosts
                      No such map hosts.byname. Reason: Can't bind to server which serves this domain

                      1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller
                        last edited by

                        There is no need to test NIS functions if the NIS server hasn't started yet. If the service can't start, you know that it isn't going to work. This is like telling us that the car isn't steering well right after demonstrating that it hasn't started yet.

                        So we must start by figuring out why it isn't starting and fix that. When something doesn't work, since it throws no useful error messages, we need to start by looking at the logs to see what it is telling us.

                        1 Reply Last reply Reply Quote 0
                        • LakshmanaL
                          Lakshmana
                          last edited by scottalanmiller

                          My NIS Client Configuration Step by step process is given below if any error please inform

                          nano /etc/yp.conf
                          
                            GNU nano 2.2.6             File: /etc/yp.conf                       Modified  
                          
                          #
                          # yp.conf       Configuration file for the ypbind process. You can define
                          #               NIS servers manually here if they can't be found by
                          #               broadcasting on the local net (which is the default).
                          #
                          #               See the manual page of ypbind for the syntax of this file.
                          #
                          # IMPORTANT:    For the "ypserver", use IP addresses, or make sure that
                          #               the host is in /etc/hosts. This file is only interpreted
                          #               once, and if DNS isn't reachable yet the ypserver cannot
                          #               be resolved and ypbind won't ever bind to the server.
                          
                          # ypserver ypserver.network.com
                          domain test.com server shiva.test.com
                          
                          root@ubuntu:~# nano /etc/nsswitch.conf 
                          
                          # /etc/nsswitch.conf
                          #
                          # Example configuration of GNU Name Service Switch functionality.
                          # If you have the `glibc-doc-reference' and `info' packages installed, try:
                          # `info libc "Name Service Switch"' for information about this file.
                          
                          passwd:         compat nis
                          group:            compat nis
                          shadow:         compat nis
                          
                          hosts:          files mdns4_minimal [NOTFOUND=return] dns nis
                          networks:       files
                          
                          protocols:       db files
                          services:        db files
                          ethers:            db files
                          rpc:                 db files
                          
                          root@ubuntu:~# nano /etc/pam.d/common-session
                          
                            GNU nano 2.2.6         File: /etc/pam.d/common-session                        
                          
                          # since the modules above will each just jump around
                          session required                        pam_permit.so
                          # The pam_umask module will set the umask according to the system default in
                          # /etc/login.defs and user settings, solving the problem of different
                          # umask settings with different shells, display managers, remote sessions etc.
                          # See "man pam_umask".
                          session optional                        pam_umask.so
                          # and here are more per-package modules (the "Additional" block)
                          session required        pam_unix.so
                          session optional        pam_systemd.so
                          # end of pam-auth-update config
                          session optional        pam_mkhomedir.so skel=/etc/skel umask=077
                          
                          root@ubuntu:~# reboot
                          
                          oot@ubuntu:~# ypwhich
                          ypwhich: Can't communicate with ypbind
                          root@ubuntu:~# ypcat passwd
                          No such map passwd.byname. Reason: Can't bind to server which serves this domain
                          root@ubuntu:~# ypcat hosts
                          No such map hosts.byname. Reason: Can't bind to server which serves this domain
                          root@ubuntu:~#
                          
                          1 Reply Last reply Reply Quote 0
                          • LakshmanaL
                            Lakshmana
                            last edited by scottalanmiller

                            Client side output for digging domain name

                            shiva@ubuntu:~$ dig test.com any
                            
                            ; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> test.com any
                            ;; global options: +cmd
                            ;; Got answer:
                            ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16217
                            ;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 2, ADDITIONAL: 3
                            
                            ;; OPT PSEUDOSECTION:
                            ; EDNS: version: 0, flags:; udp: 4096
                            ;; QUESTION SECTION:
                            ;test.com.			IN	ANY
                            
                            ;; ANSWER SECTION:
                            test.com.		7200	IN	SOA	ns65.worldnic.com. namehost.worldnic.com. 115070707 10800 3600 604800 3600
                            test.com.		7200	IN	TXT	"google-site-verification=kW9t2V_S7WjOX57zq0tP8Ae_WJhRwUcZoqpdEkvuXJk"
                            test.com.		7200	IN	MX	10 mx.spamexperts.com.
                            test.com.		7200	IN	MX	20 fallbackmx.spamexperts.eu.
                            test.com.		7200	IN	MX	30 lastmx.spamexperts.net.
                            test.com.		3600	IN	A	69.172.200.235
                            test.com.		7200	IN	NS	ns66.worldnic.com.
                            test.com.		7200	IN	NS	ns65.worldnic.com.
                            
                            ;; AUTHORITY SECTION:
                            test.com.		7200	IN	NS	ns66.worldnic.com.
                            test.com.		7200	IN	NS	ns65.worldnic.com.
                            
                            ;; ADDITIONAL SECTION:
                            ns65.worldnic.com.	171249	IN	A	207.204.40.133
                            ns66.worldnic.com.	171249	IN	A	207.204.21.133
                            
                            ;; Query time: 841 msec
                            ;; SERVER: 127.0.0.1#53(127.0.0.1)
                            ;; WHEN: Thu Jul 16 18:50:33 IST 2015
                            ;; MSG SIZE  rcvd: 396
                            
                            shiva@ubuntu:~$
                            
                            1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller
                              last edited by

                              I edited your posts for readability.

                              1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller
                                last edited by

                                You are getting way too deep when your errors are very shallow. Right now it looks like NIS isn't running yet:

                                oot@ubuntu:~# ypwhich
                                ypwhich: Can't communicate with ypbind
                                root@ubuntu:~# ypcat passwd
                                No such map passwd.byname. Reason: Can't bind to server which serves this domain
                                

                                Before you are doing all of this.... just look and see if NIS is running. Just this command on your NIS server:

                                netstat -tulpn
                                
                                1 Reply Last reply Reply Quote 0
                                • Reid CooperR
                                  Reid Cooper
                                  last edited by

                                  Or query the NIS service and ask it if it is running.

                                  1 Reply Last reply Reply Quote 1
                                  • Reid CooperR
                                    Reid Cooper
                                    last edited by

                                    Have firewall ports been opened for RPCBIND and whatever else is needed?

                                    1 Reply Last reply Reply Quote 1
                                    • LakshmanaL
                                      Lakshmana
                                      last edited by Lakshmana

                                      How to open ports for the NIS and NFS in iptables?
                                      I have followed the below to link configure for the NIS configurattion now.

                                      https://help.ubuntu.com/community/SettingUpNISHowTo

                                      But I was not able to open the ports I have given in the website

                                      I have also installed the iptables-persistent in the ubuntu server but the default path to edit rules was not able to identify.

                                      When I use the rules for the port I have opened means the error coming here is
                                      Bad Argument"IP"

                                      scottalanmillerS 2 Replies Last reply Reply Quote 0
                                      • scottalanmillerS
                                        scottalanmiller @Lakshmana
                                        last edited by

                                        @Lakshmana said:

                                        How to open ports for the NIS and NFS in iptables?

                                        Same way as the other times you opened ports in iptables. Just change the port numbers. For now, while you are trying to figure things out, just turn iptables off.

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

                                          @Lakshmana said:

                                          When I use the rules for the port I have opened means the error coming here is
                                          Bad Argument"IP"

                                          Instead of describing the issue in cases like this, supply the screen shot or a copy/paste of the commands that fail and the error. In almost all cases it's just a typo or missed argument. In every case we will ask you to do this. So instead of making us ask, just start by providing the information so we can assist more quickly.

                                          1 Reply Last reply Reply Quote 0
                                          • LakshmanaL
                                            Lakshmana
                                            last edited by

                                            Configured Properly and now it is working

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