I would be grateful if anybody could supply some more information on the 'nis homedir' option (Samba 1.9.17a4). We have home directories spread over several Samba hosts. Although they can be accessed via 'amd' from any other server it would be a great benefit to be able to guarantee that all connections were made directly to the correct server. The man page looks promising but I have not succeeded in getting it to work as the documentation sugggests. According to 'man smb.conf' nis homedir (G) Get the home share server from a NIS (or YP) map. For unix systems that use an automounter, the user's home directory will often be mounted on a workstation on demand from a remote server. When the Samba logon server is not the actual home directory server, two network hops are required to access the home directory and this can be very slow espe- cially with writing via Samba to an NFS mounted directory. This option allows samba to return the home share as being on a different server to the logon server and as long as a samba daemon is running on the home directory server, it will be mounted on the Samba client directly from the direc- tory server. The 'nis homedir' option works fine insofar as the debug log files shows that the HOMESHR is extracted correctly from the auto.home nis map. e.g. (some details changed) password server abcde3 accepted the password lp_servicenumber: couldn't find xyz31 adding home directory xyz31 at /home/dkb/sm/dk/xyz31 xyz31 is in 14 groups 6501 25 23 22 6926 6841 6505 6832 6923 6833 6515 10 6928 6929 uid 1234 registered to name xyz31 Setting default HOMESHR to: \\logon server\HOMES NIS Domain: sm.ic.ac.uk NIS lookup succeeded Home server length: 3 Allocated 15 bytes for HOMESHR User = xyz31 UID = 1234 NIS result = dkb:/export/disk1/homes/sm/dk/xyz31 HOMESHR = \\dkb\homes However, how is this information to be used and a connection request be passed to the correct server? 'NET USE H: /home' (from Win95) will connect on the logon server 'NET USE H: \\server1\homes' will connect on the stated server 'NET USE H: \\server1\%username%' will connect on the stated server The man page says 'as long as a samba daemon is running on the home directory server'. We normally start smb daemons via inetd.conf . However, the transfer to the server defined in auto.home still does not appear to work (according to smbstatus) even if an smbd already exists for the user on the target server. There are many things which could be done if it were possible to use a nis map to specify the best server to connect to. e.g. it would be useful if one could a specify a nis map at the level of a particular resource (not just home directory). It would also be good if there were a means of getting the HOMESHR information into an environment variable that could be used (say) in subsequent NET USE statements. The nis homedir technique could also ensure that all mounts to a given resource use the same lock directories rather than having duplicate lock files across several servers if that resource is opened via different servers. Thank you to anybody who can provide a few pointers to how 'nis homedir' should be used. Charles
I have a Samba (2.2.8a) PDC on one FreeBSD box, and a fileserver on another FreeBSD box (both 4.8-RELEASE). I have user home directories on the fileserver and they are exported via NFS. I would like to have them been available via Samba (via the /homes share) without having to NFS-mount them on the PDC. So, it seems as if the configuration options "nis homedir" and "homedir map" are my ticket in. So, I tried a simple map in a file 'amd.homes' something with like this: someuser fileserver:/u/someuser And added to my smb.conf these lines: nis homedir = yes homedir map = amd.homes I added amd.homes as an available NIS map, and verified its export with: ypcat -k amd.homes I have Samba (2.2.8a) installed on the fileserver, but now I am stumped. If the point of "nis homedir" is to directly mount the NFS-exported home directory, how does Samba on the fileserver come in? How should I configure the installation of Samba on the fileserver, specifically in the [/homes] module? -- Paul Smith <paul@cnt.org> Webmaster/Systems Administrator Center for Neighborhood Technology Chicago, Illinois USA