You are not logged in.
Hello, just a quick question I'm sure one or more of you could nail pretty quickly. I am looking to shorten the entries in my samba configuration files. Here is an example:
[Music] ; user="jlacroix"
force user = jlacroix
path = /home/jlacroix/Music
writable = no
public = yes
hosts allow = 172.16.254.10 172.16.254.11 172.16.254.12 172.16.254.13 172.16.254.14 172.16.254.15 172.16.254.16 172.16.254.17 172.16.254.18 172.16.254.19 127.0.0.1The IP ranges under "hosts allow" is kinda long. Can I shorten that, and make it a range of some sort instead of listing each IP address I want to allow? I Googled this, and didn't find it. Perhaps my search skills suck.
Last edited by jlacroix (2011-08-01 00:03:24)
Offline
This is about as small as you can make it, using CIDR masks:
172.16.254.10/31
172.16.254.12/30
172.16.254.16/30
127.0.0.1I'm not sure if Samba supports ranges in the config file; you can easily try:
172.16.254.10-172.16.254.19 127.0.0.1Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
This is about as small as you can make it, using CIDR masks:
172.16.254.10/31 172.16.254.12/30 172.16.254.16/30 127.0.0.1I'm not sure if Samba supports ranges in the config file; you can easily try:
172.16.254.10-172.16.254.19 127.0.0.1
That didn't work, looks like this isn't possible. ![]()
Thanks though!
Offline
That didn't work, looks like this isn't possible.
I didn't think it would support ranges, and I just had a look at the man page and it doesn't look to support CIDR either, so correction to my last would be:
172.16.254.10/255.255.255.254
172.16.254.12/255.255.255.252
172.16.254.16/255.255.255.252
127.0.0.1Doesn't really make it much shorter like that though ![]()
EDIT: too many dots
Last edited by fukawi2 (2011-08-01 07:02:57)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Thank you for your help, that doesn't make it much shorter. I wonder why they don't include a feature like this by default? I bet a lot of people could use it.
Offline