![]() |
|
|
|
|
|
Configure a NIS and NFS client on a FreeBSD box
By Aditya Kulkarni <aditya@freeos.com>
An article explaining how to configure a NIS and NFS client on a FreeBSD box What is NIS and how does it work? NIS is an RPC-based client/server system that allows a group of machines within an NIS domain to share a common set of configuration files. This permits a system administrator to set up NIS client systems with only minimal configuration data and add, remove or modify configuration data from a single location. We will not go in-depth of technical details about slave and master NIS servers, but instead will run you through some configurations. Edit the /etc/rc.conf file and add the following lines to it nis_client_enable="YES" Assuming that nis_domain_name is your nis domain name. Next edit the /etc/group file as: Add a + at the end of the file Something similar to the following dialer:*:68: Next edit /etc/master.passwd without modifying /etc/passwd file. This is important. Add the following line at end of the file pop:*:68:6::0:0:Post Office Owner:/nonexistent:/sbin/nologin Finally edit the /etc/hosts and /etc/host.conf files to contain the localhost and nisdomain nameservers. For /etc/host.conf file: Uncomment the # at the #nis statement if NIS is configured. For /etc/hosts file: Add the +:: at the end of the file containing local and NIS server in the list. Have something similar to this: 127.0.0.1 localhost.lucifer.abc.net localhost where lucifer is your BSD machine name and damien is your NIS server . What is NFS and what does it do? NFS allows you to share directories and files on one machine with one or more machines via the network they are attached to. Using NFS, users and programs can access files on remote systems as if they were local files. NFS is composed of two sides - a client side and a server side. Think of it as a want/have relationship. The client wants the data that the server side has. The server shares its data with the client. In order for this system to function properly a few processes have to be configured and running properly. The server has to be running the following daemons: The client side only needs to run a single daemon: nfsiod - The NFS async I/O Daemon which services requests from its NFS server. For the NFS client add the line in your /etc/rc.conf file nfs_client_enable="YES" You now need to mount the NFS on the client by typing the following command: This will mount /home on the server on /home on the client. If everything is setup correctly you should be able to go into /home on the client and see all the files that are on the server. To make these changes permanent edit /etc/fstab and add the necessary home directories to mount. For e.g., our /etc/fstab would show: Once this is done, NIS is configured on your FreeBSD client and up and running. For a more detailed description, see the FreeBSD handbook
Other articles by Aditya Kulkarni
Current Rating: [ 6.2 / 10 ]
Number of Times Rated: [ 30 ]
|
|
|
© 1998-2004 FreeOS Technologies (I) Pvt. Ltd. All rights reserved.
[Privacy Policy]
![]() |