[Samba] hosts allow

Joel Hammer Joel at HammersHome.com
Thu Feb 28 04:26:02 GMT 2002


How many clients are we talking about here?

This seems to be a name resolution problem. Are you having this
only with samba? What if you type nslookup pc406 from your samba server?
I have a small home network which supplies clients dynamic addresses. As
I recall, the only way I could address these clients by name instead of
by an ip number was to:
 1. Fix up my dhcp server to recognize each machine by their MAC.
 2. Enter those values into my DNS server.

For example, I have this in my /etc/dhcpd.conf file.
It looks for the MAC address.

host hammer1 {
  hardware ethernet 00:a0:f0:ee:bb:ba;
   fixed-address 192.168.0.1;
   option host-name "hammer1.jhammer.org" ;
   }                                                           

Look into man dhcpd.conf. I do not know if this is the only solution,
however. If this is the way to go, and you have a large number of
machines, you could write a script to capture those mac's and write
your dhcpd.conf file, I suspect. You could just log all your machines
onto the network, and comb through /var/state/dhcp/dhcpd.leases to get
the info you need. 

You wouldn't need a DNS. You could, again using a script if necessary,
make a big /etc/hosts file. I have never used a big /etc/hosts
file, so I don't know how feasible that would be, however.

Alternatively, I believe there are variants of DHCPD which will
automatically update the DNS, but, the version available for linux didn't do
that the last time I checked. Again, knowing how to write scripts could fix
that up, too.

Joel


It may be possible On Thu, Feb 28, 2002 at 08:25:39AM -0000, Kristyan Osborne wrote:
> opps a typo, should be /etc/resolv.conf, any ideas???
> 
> -----Original Message-----
> From: Joel Hammer [mailto:Joel at HammersHome.com]
> Sent: 27 February 2002 22:08
> To: Kristyan Osborne; samba at lists.samba.org
> Subject: Re: [Samba] hosts allow
> 
> 
> I assume that is just a typo below in /etc/resolve.conf.
>                                                  ^
> Joel
> 
> 
> On Wed, Feb 27, 2002 at 05:51:21PM -0000, Kristyan Osborne wrote:
> > Hi,
> > 
> > when using non static ip's do you have to do anything cleaver to
> samba.
> > In /etc/resolve.conf there is:
> > 
> > domain  longhill.brighton-hove.sch.uk
> > nameserver  10.108.1.56
> > 
> > If I put hosts allow = pc406 under a share it will deny me access. If
> I
> > put pc406.longhill.brighton-hove.sch.uk it allows me access, reading
> the
> > man pasges it states that I should be able to have just pc406.
> > 
> > Can anyone help me on this.
> > 
> > Cheers
> > 
> > -------------
> > Kristyan Osborne IT Assistant Manager
> > Longhill High School
> > 
> > 
> > -- 
> > To unsubscribe from this list go to the following URL and read the
> > instructions:  http://lists.samba.org/mailman/listinfo/samba
> 
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba




More information about the samba mailing list