Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-01-2005, 03:00 PM   #1
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 =
this would only allow the computer with the address to have accsess

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

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
Registered: May 2003
Location: Wageningen, the Netherlands
Distribution: OS X & FreeBSD
Posts: 488

Rep: Reputation: Disabled
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
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 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

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

hosts allow =

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.


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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:09 PM.

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