LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 01-01-2005, 03:00 PM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
smb.conf hosts allow


I have been struggling to get my windows computer to see the contents of my linux computer(permission problem) I tried this line as referenced in the gentoo samba how to

hosts allow = 192.168.1.*
this did not work, I kept getting permsission errors

the I tried this line
hosts allow = 192.168.1.100/103
this would only allow the computer with the address 192.168.1.100 to have accsess

this is the only line that worked for me
hosts allow = 192.168.1.100,192.168.1.102

do you guys have any imput on this. Does the way mentioned in the gentoo docs work for some of you?
 
Old 01-01-2005, 03:26 PM   #2
JunctaJuvant
Member
 
Registered: May 2003
Location: Wageningen, the Netherlands
Distribution: OS X
Posts: 488

Rep: Reputation: 31
Are you sure you didn't take that (the one with the asterisk in it) from the cupsd.conf?
Also (because I'm curious myself) I read in the smb.conf manual that "192.168.1. " has the effect of allowing "192.168.1.*", so I think you don't need the "*" wildcard.

Last edited by JunctaJuvant; 01-01-2005 at 03:46 PM.
 
Old 01-01-2005, 05:38 PM   #3
nargonne
LQ Newbie
 
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Mandrake
Posts: 3

Rep: Reputation: 0
Got this from my SWAT help file for host allow:


hosts allow (S)

A synonym for this parameter is allow hosts.

This parameter is a comma, space, or tab delimited set of hosts which are permitted to access a service.

If specified in the [global] section then it will apply to all services, regardless of whether the individual service has a different setting.

You can specify the hosts by name or IP number. For example, you could restrict access to only the hosts on a Class C subnet with something like allow hosts = 150.203.5. . The full syntax of the list is described in the man page hosts_access(5). Note that this man page may not be present on your system, so a brief description will be given here also.

Note that the localhost address 127.0.0.1 will always be allowed access unless specifically denied by a hosts deny option.

You can also specify hosts by network/netmask pairs and by netgroup names if your system supports netgroups. The EXCEPT keyword can also be used to limit a wildcard list. The following examples may provide some help:

Example 1: allow all IPs in 150.203.*.*; except one

hosts allow = 150.203. EXCEPT 150.203.6.66

Example 2: allow hosts that match the given network/netmask

hosts allow = 150.203.15.0/255.255.255.0

Example 3: allow a couple of hosts

hosts allow = lapland, arvidsjaur

Example 4: allow only hosts in NIS netgroup "foonet", but deny access from one particular host

hosts allow = @foonet

hosts deny = pirate

Note that access still requires suitable user-level passwords.

See testparm(1) for a way of testing your host access to see if it does what you expect.

Default: none (i.e., all hosts permitted access)

Example: allow hosts = 150.203.5. myhost.mynet.edu.au
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"hosts allow" in smb.conf expects only FQDN, not alias or netbios name!? Not now, John! Linux - Networking 1 10-13-2006 06:17 AM
samba conf smb.conf regnier Mandriva 5 02-17-2005 05:27 AM
where is the smb.conf?? willigi Linux - Software 4 01-12-2005 11:48 AM
/etc/hosts, /etc/resolve.conf and /etc/host.conf config probs below_average Linux - Networking 1 12-08-2004 11:07 PM
smb.conf help PlatinumRik Linux - Networking 6 05-29-2003 02:30 PM


All times are GMT -5. The time now is 04:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration