8.8 Working with NIS

   

In networks where NIS and NFS are in use, it is common for users' home directories to be mounted over the network by NFS. If a Samba server being used to authenticate user logons is running on a system with NFS-mounted home directories shared with a [ homes ] share, the additional overhead can result in poor performance ”about 30% of normal Samba speed.

Samba has the ability to work with NIS and NIS+ to find the server on which the home directories actually reside so that they can be shared directly from that server. For this to work, the server that holds the home directories must also have Samba running, with a [homes] share of its own.

8.8.1 NIS Configuration Options

Table 8-8 introduces the NIS configuration options specifically for setting up users.

Table 8-8. NIS options

Option

Parameters

Function

Default

Scope

nis homedir

Boolean

If yes , uses NIS instead of /etc/passwd to look up the path of a user's home directory.

no

Global

homedir map

string (NIS map name )

Sets the NIS map to use to look up a user's home directory.

None

Global

8.8.1.1 nis homedir, homedir map

The nis homedir and homedir map options are for Samba servers on network sites where Unix home directories are provided using NFS, the automounter, and NIS.

The nis homedir option indicates that the home-directory server for the user needs to be looked up in NIS. The homedir map option tells Samba in which NIS map to look for the server that has the user's home directory. The server needs to be a Samba server so that the client can do an SMB connect to it, and the other Samba servers need to have NIS installed so that they can do the lookup.

For example, if user joe asks for a share called [joe] , and the nis homedir option is set to yes , Samba will look in the file specified by homedir map for a home directory for joe . If it finds one, Samba will return the associated system name to the client. The client will then try to connect to that machine and get the share from there. Enabling NIS lookups looks like the following:

 [globals]     nis homedir = yes     homedir map = amd.map 
   


Using Samba
Using Samba: A File and Print Server for Linux, Unix & Mac OS X, 3rd Edition
ISBN: 0596007698
EAN: 2147483647
Year: 2003
Pages: 475

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net