Wednesday, December 22, 2010

How to configure autofs with NFS4?

■ Requirement : install & configure autofs
■ OS Environment : Linux[RHEL, Centos]
■ Application:autofs
■ Implementation Steps : 

1. On NFS client machine do the following :

$ yum install autofs

2. Edit /etc/auto.master & and put like :

/home /etc/auto.home --timeout=60

4. Edit /etc/auto.home and put following :

* -fstype=nfs,rw,nosuid,soft,fsid=0 IPof_nfs_server:/home/&

5. Start autofs :

$/etc/init.d/autofs start

2 comments:

  1. Hello kmaiti sir,

    I am newbie to Linux. I have a fc9 box working as nfs server and rhel4 box nfs client. I want u1 to automount and u2 to local mount. That means, when u1 logs in client he have his home directory by default mounted from server. But when u2 logging client, u2 must have local home directory and not server home directory. Both user exist with both server.

    Thanks.

    Ran Ada

    ReplyDelete
  2. Hi Ran,

    Thanks for your interest. However, I am not sure what you mean by "u1" or "u2"! I hope these are users on the following machine :

    -----
    U1 user has : On Remote machine ie on NFS or NIS server
    U2 user has : On client Machine
    -----

    To full-fill this requirement you need to configure NIS along with NFS(with autofs). You can refer the following URL for more details :

    -------
    http://kmaiti.blogspot.com/2011/02/how-to-install-and-configure-nis-server.html
    -------

    PS: The configuration is not on FC.

    ReplyDelete