[wellylug] Samba & DHCP config ?

Cliff Pratt enkidu at cliffp.com
Thu Oct 27 22:46:44 NZDT 2005


You don't assign a share to a user on another machine. A 
user on another machine accesses a share made available on 
your machine. For that, he/she needs to know either the name 
of the machine AND have a way of converting that to an IP 
address OR the IP address of your machine.

eg all the following will list the shares on my server 
(debian) from my Windows machine (honeybee).

net view debian
net view debian.cliffs.bogus
net view 192.168.2.67

In the first two cases the 'net' prog takes the name and 
uses the name service (NetBIOS or DNS) to find the IP 
address of the Samba server. Then it sends packets to the IP 
address of the Samba server to find out information from the 
Samba server. If a mapping had previously been made then 
data would be transferred between the Samba server and the 
other machine over the connection that was made when the 
share was mapped or the machine was rebooted (if a 
persistent mapping had been made).

The Samba server doesn't know how to connect the machine 
name and IP address. The *client* sends request to the Samba 
server. Either the connection has already been made 
previously in which case the *client* remembers the IP 
address of the server, or the request (eg net view) contains 
the name of the server or its IP address. If the request 
contains the name then the *client* has to resolve this (by 
NetBIOS or DNS) before it can contact the server. There has 
to be name resolution before a connection can be made to the 
server.

*Name resolution* to IP address comes first, and actually 
connection follow. Name resolution can be by DNS or by 
NetBIOS (WINS), but the end result is an IP address which 
can be used to start communications.

Cheers,

Cliff

Roger Young wrote:
 >
> Alright, now suppose I wish to assign a share on my machine
> to a user on another machine. How do I refer to that other
> machine if I don't know it's IP address (although Samba does)?
> Is it (as Ian suggested) that the Samba server knows how to connect
> machine name and (router assigned) IP address, so it is sufficient
> to identify the share in smb.conf by machine name?
> 




More information about the wellylug mailing list