[Samba] access my created share in smb.conf Only by Ip

Rowland Penny rpenny at f2s.com
Wed Oct 17 08:07:43 MDT 2012


On 17/10/12 15:20, Carlos R. Pena Evertsz wrote:
> Hi Mohammad,
>
> I had the same problem like many others,  so I think samba should 
> include a note like mine in their documentation.
>
> This is the trick for successfully access the share with the hostname..
>
> Be sure you have the following lines in the smb.conf:
>
> netbios name = yourhostname

This is set by default

> wins support = yes

This turns on the wins server, you should only turn this on if it is the 
only one.

>
> Find the "name resolve order" directive and be sure you have it in the 
> following order.
>
> name resolve order = wins lmhosts hosts bcast
>
>
> Add the following line:
>
> hosts allow = the host ip / mask
>
> Where the host ip is your server ip.
>              the mask is the mask you are using in all your windows 
> clients.

If you set it like this, the only machine that will be able to connect 
would be the server itself. It should be, from data supplied, 
192.168.1.0/255.255.255.0 This would allow any computer on the subnet to 
connect.

> This is the most important thing. For example If you have in your 
> server the mask 255.255.0.0 then all your clients must have the same 
> network mask. Windows clients with the same mask of the server will 
> see the server on the network with it hostname otherwise you need to 
> access the server by its ip number. I think this is a Windows issue 
> but they have left it in this way so we have to live with it.
>
> I hope this can help you.
>
I doubt it.

Rowland

> Carlos
> Santo Domingo, Dominican Republic
> On 10/17/2012 6:55 AM, Mohammad Ebrahim Abravi wrote:
>> Hello
>>
>> samba4 rc3
>> *s4-ad -> samba server Host name
>> test.s4.com -> domain name*
>> *Dns Server -> Samba Internal DNS server , Bind 9.9.1-P2*
>> *win xp*
>>
>> have access to default  share such as sysvol  by dns name (\\test.s4.com
>> \sysvol)
>>
>> but if  created a share in smb.conf  Only access by IP such as :
>>
>> \\test.s4.com\myshare   ->  no  access and ask me for user and 
>> password !
>> \\192.168.1.6\myshare  ->  access
>>
>> If using *s4-ad.test.s4.com* my share accessible !!!
>>
>> \\test.s4.com\myshare   ->  no  access !
>> \\s4-ad.s4.com <http://test.s4.com>\myshare   -> access !
>>
>> \\test.s4.com\sysvol   ->  access !
>> \\*s4-ad* <http://test.s4.com>. 
>> <http://test.s4.com>test.s4.com\sysvol  ->
>> access !
>>
>> Note:
>> In *\\test.s4.com* seen all the shared directory, but not accessible
>>
>> in *samba alpha17* no need type *s4-ad*
>>
>> what happened ?
>>
>> This is  Bug in samba4 rc3 ?
>>
>>
>> Thanks
>


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the samba mailing list