Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I setup autofs via NIS to mount client's home directory which are located on the server

Posted on 2013-06-17
5
Medium Priority
?
1,207 Views
Last Modified: 2013-07-06
Hi,

I can get autofs to work on a client Ubuntu computer, but auto.master and auto.local are setup locally oppose to NIS.

My server is running RHEL 6.2 and it's hostname is main. My client is running Ubuntu 12.04.2

I commented out the following in the auto.master file:
/mnt       /etc/auto.local    --timeout=300

And then added the following in the file:
+auto.master

I commented out the following in the auto.local file:
raid        -fstype=nfs,rw,sync,hard,intr                       main:/mnt/raid

And added the following in the file:
+auto.local

Is this the correct way to tell /etc/auto.master and /etc/auto.local to use the NIS database?

I then tried to tell the client to use these files by typing the following:
/usr/lib/yp/ypinit -s main

and received the following in return:
Can't enumerate maps from main. Please check that it is running.

What does that mean? Also, is this the correct way to rebuild the NIS map on the client machine?

Thanks,
Mark
0
Comment
Question by:Mccalma1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 21

Expert Comment

by:Daniel McAllister
ID: 39256306
Mark,

At first glance, I think you're over-thinking things.

Once you have an automount working, there should be no need to add NIS (unless you need it for something else).

The mount (auto or otherwise) will already map userIDs, and NFS will prevent root-intrusion (unless you override it). So point your user's home directories (in /etc/passwd) to the location that the automounter is SUPPOSED to put them, and watch the magic happen.

If it turns out you DO need NIS, the error you're reporting is likely that there is no portmapper service running on the NIS server (ypserver). NIS is a portmapped service (as-in, there are no well-known-ports for NIS, they are assigned on the fly by a portmapper routine that can be queried to obtain the current port number). So you seem the "maps from the main" that cannot be mapped are the ports...

I hope this helps.

Dan
IT4SOHO
0
 

Accepted Solution

by:
Mccalma1 earned 0 total points
ID: 39256359
The nsswitch.conf file didn’t have an automount line in it. I added the following to the file:
“automount   NIS         files”

Also, from the client side, I had to type the following to copy auto.local and auto.master from server to the client:
/usr/lib/yp/ypxfr -f -c -d domainname -h server_hostname auto.master
/usr/lib/yp/ypxfr -f -c -d domainname -h server_hostname auto.local

I had to update the nsswitch.conf and do the ypxfr to get the Ubuntu computer to automount and only the ypxfr command to get a Tru64 Alpha to automount via NIS.

Why did I have to ypxfr the two files manually? Shouldn’t it have automatically done this when I typed the following on the server: "make -C /var/yp"?

Also, please correct me if I'm wrong, but I think I figured out the "Can't enumerate maps from main" issue. The "ypinit -s" command is supposed to be ran on a slave server and I tried to run it on an NIS client.

How are the clients' NIS maps kept up to date normally?
0
 

Author Comment

by:Mccalma1
ID: 39256371
We must have posted at the same time.

Anyway, I'm replacing a server at a customer location and they utilize NIS to provide the automount files to the client computers. Currently, I setup a network of computers similar to what is on-site. I have to ship and install mid July.
0
 

Author Comment

by:Mccalma1
ID: 39256384
Sorry, I failed to mention that the nsswitch.conf and ypxfr steps fixed the issue in my initial question. I just have a couple questions:

1. Why did I have to ypxfr the two files manually? Shouldn’t it have automatically done this when I typed the following on the server: "make -C /var/yp"?

2. How are the clients' NIS maps kept up to date normally?

This is my first server setup, so please bare with me.
0
 

Author Closing Comment

by:Mccalma1
ID: 39303707
The nsswitch.conf file didn’t have an automount line in it. I added the following to the file:
“automount   NIS         files”

Also, from the client side, I had to type the following to copy auto.local and auto.master from server to the client:
/usr/lib/yp/ypxfr -f -c -d domainname -h server_hostname auto.master
/usr/lib/yp/ypxfr -f -c -d domainname -h server_hostname auto.local

I had to update the nsswitch.conf and do the ypxfr to get the Ubuntu computer to automount and only the ypxfr command to get a Tru64 Alpha to automount via NIS.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If, like me, you have a lot of Dell servers in the estate you manage this article should save you a little time. When attempting to login to iDrac on any server I would be presented with two errors. The first reads "Do you want to run this applicati…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question