RE: [Samba] [Fwd: Samba-3 By Ex Chapt 3] .No good.. use Dynamic DNS Setup. / samba

2005-07-08 Thread Louis van Belle

You could use dynamic Dns.. .so what is it.. 
simple, you setup your dns, set your server to resolve it first. 
1 problem, you have dhcp assigned ip adres and your resolve.conf 
is changed everytime.

wel here is te solution
What you need: 
Bind9 , DHCP3-client ( if you get ip by dhcp from provider ) 
DHCP3-server


1) setup your dhcp client. ( not needed if you have static ip NOT assigned
bij DHCP from provider )
in /etc/dhcp3/dhclient.conf : 
send dhcp-lease-time 31449600;  == set this if you want.
supersede domain-name obl.clangame.nl;== set this to YOUR
LOCAL DNS Domain  This make your server to resove YOUR domain first.
prepend domain-name-servers 127.0.0.1;  == set this to localhost 
request subnet-mask, broadcast-address, routers, host-name,
domain-name, domain-name-servers,   == if above is not
working, remove this line.
netbios-name-servers, netbios-scope;
#require subnet-mask, domain-name-servers;

if now an ip is assigned it wil put 
search obl.clangame.nl
nameserver 127.0.0.1
in the resolve.conf

this make 1 resolve YOUR domain first, and resolve first over YOUR NDS.

2) automatic adding dhcp-clients (your pc's) to the dns.
in the /etc/dhcp3/dhcpd.conf  
192.168.15.1 is my server where samba, dhcp server and client and dns is
running on.

# Sample configuration file for ISC dhcpd for Debian
server-identifier generals; == generals is my
servername.
authoritative;
log-facility local7;
ddns-update-style interim;
allow-cient-updates;
ddns-updates on;
ddns-domainname obl.clangame.nl;  == obl.clangame.nl is my local
domain at home.
ddns-rev-domainname 15.168.192.in-addr.arpa;  == my local net.
192.168.15.0/24 ( 192.168.15.0/255.255.255.0 ) 


key ddns-key {
=== key = ddns-key , but ddns-key could also be some other name
algorithm hmac-md5; secret ddnsHereWasSomeTh1ingElse; === more on
this at the dns setup.  my key starts with ddns-secretkey
}
This one is needed to allow dhcp3-server to update bind9 (the dns)
zone obl.clangame.nl. {
== these are also defined in your dns. The HOST Zone
primary 127.0.0.1;
== define your dns server IP
key ddns-key;
== dont forget your ddnskey
}
zone 15.168.192.in-addr.arpa. {
== these are also defined in your dns. The REVERSE Zone ( ptr records )
primary 127.0.0.1;
== define your dns server IP
key ddns-key;
== dont forget your ddnskey
}
#
#
# use shared-network if you have a interface alias like eth0 and et0:1
# Shared Network on marco
shared-network obl.clangame.nl {
# Subnet definition for Servers LocalNet
subnet 127.0.0.0 netmask 255.0.0.0 {
}
# Subnet definition for marco options
subnet 192.168.15.0 netmask 255.255.255.0 {
range 192.168.15.30 192.168.15.45;
option broadcast-address 192.168.15.63;
option subnet-mask 255.255.255.0;
option domain-name obl.clangame.nl;
option domain-name-servers 192.168.15.1;
option netbios-name-servers 192.168.15.1;
option netbios-node-type 8;
option ntp-servers 192.168.15.1;
option routers 192.168.15.1;
default-lease-time 86400;
max-lease-time 172800;
one-lease-per-client on;
option ip-forwarding off;
option time-offset -18000;
allow unknown-clients;
}
}

Wel , now is your dhcp server and client setup, and ready to go.
Now te hard part.  BIND9 i use the Debian standard, so 3 config files for
bind.
1) the named.conf, nothing to do here.
2) the named.conf.options, Check this one and adjust as needed.
3) the named.conf.local , add your domains here. i use webmin to do that.

// This is the primary configuration file for the BIND DNS server named.
// If you are just adding zones, please do that in
/etc/bind/named.conf.local
include /etc/bind/named.conf.options;
zone . {
type hint;
file /etc/bind/db.root;
};
zone localhost {
type master;
file /etc/bind/db.local;
allow-transfer { localhost; };
#   allow-update{none;};
};
zone 127.in-addr.arpa {
type master;
file /etc/bind/db.127;
allow-transfer { localhost; };
#   allow-update{none;};
};
zone 0.in-addr.arpa {
type master;
file /etc/bind/db.0;
};
zone 255.in-addr.arpa {
type master;
file /etc/bind/db.255;
};
# below works in bind9 from sarge ( testing )
#zone com { type delegation-only; };
#zone net { type delegation-only; };
// From the release notes:
//  Because many of our users are uncomfortable receiving undelegated
answers
//  from root or top level domains, other than a few for whom that behaviour
//  has been trusted and expected for quite some length of time, we have now
//  introduced the root-delegations-only feature which 

Re: [Samba] [Fwd: Samba-3 By Ex Chapt 3]

2005-07-06 Thread Eric Hines
Yes, I am--or at least I think so; the daemon is running, and it's 
configured according the the Chapt 3 example.  The /etc/resolv.conf file 
says it's written by /etc/dhclient-script, so I disabled that file, 
adjusted the resolv and tried again.  No effect.  Also, during reboot, 
when dhcpd started up, I got the error message Not configured to listen 
on any interface.  Wrote 5 new leases.  When the reboot completed, I 
had no Internet connection whatsoever.  I had to re-enable 
dhclient-script and reboot.


So I remain with the problems that I have no DNS resolution capability, 
and I cannot edit, with permanence, /etc/resolv.conf.  I'd probably be 
satisfied with the latter if I could get DNS to work.


Thanks

Eric Hines

Chris Nicholls wrote:


Are you using dhcp to get an IP address on that server?
Every time dhcpcd gets an IP address it overwrites the resolv.conf.  
So I think that's why it's changing every time you reboot. dhcpcd can 
be run with the -R option to prevent it from overwriting resolv.conf 
(check out the dhcpcd man page).   I'm not sure where you'd specify 
that as i don't use FC.  But it's probably easier to just give that 
machine a static IP.


Chris


Eric Hines wrote:

One more thing I forgot to mention.  The chapter calls for editing 
/etc/resolv.conf, but in my case it won't stay edited--it keeps 
getting set back to an original form (for searching my ISP) on every 
reboot.


Thanks again.

snip

I'm running Samba v 3.0.14a on an FC3 machine.  I've got two basic 
problems: one centers on my DNS set up and the other is an 
authenticated logon problem.  With /etc/nsswitch.conf set to hosts: 
dns, I cannot ping my samba server--Host not found. Nor does host 
lserver1.test.biz (which appears in my /etc/hosts file) resolve the 
name (incidentally, host -f ... just tells me the f is an illegal 
option).   WINS seems to resolve OK (at least the test for that in 
the chapter passes).  I've checked my files several times, and I can 
find no error in them.

snip

Any help on these two would be greatly appreciated.

Eric Hines



--
He can compress the most words into the smallest ideas of any man
I ever met.
 - Abraham Lincoln

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] [Fwd: Samba-3 By Ex Chapt 3]

2005-07-06 Thread Dwight Tovey

Eric Hines said:
 Yes, I am--or at least I think so; the daemon is running, and it's
 configured according the the Chapt 3 example.  The /etc/resolv.conf file
  says it's written by /etc/dhclient-script, so I disabled that file,
 adjusted the resolv and tried again.  No effect.  Also, during reboot,
 when dhcpd started up, I got the error message Not configured to listen
  on any interface.  Wrote 5 new leases.  When the reboot completed, I
 had no Internet connection whatsoever.  I had to re-enable
 dhclient-script and reboot.

 So I remain with the problems that I have no DNS resolution capability,
 and I cannot edit, with permanence, /etc/resolv.conf.  I'd probably be
 satisfied with the latter if I could get DNS to work.


You need to understand the difference between dhcpd and dhcpcd.  dhcpd is
the server that provides network configuration information to other
clients out on the network.  dhcpcd is the client part that requests that
configuration info from the server.  If the other machines on your
internal network have static IP addresses, then you don't need to be
running dhcpd.  However, you probably do want to run dhcpcd on your
gateway machine because it gets the network config info from your ISP.

You can tell dhclient to get the IP address and gateway info, but to
ignore what the server tells it to do for the DNS server.  Look at the man
pages for dhclient-script.  If you create an executable script called
/etc/dhclient-enter-hooks and in there define the function
'make_resolv_conf()', you can override how your /etc/resolv.conf gets
handled.  I have one on a FC3 machine at home.  I can't get to it at the
moment, but from memory I believe that you can do something like this in
dhclient-enter-hooks:

===8-
#!/bin/bash

make_resolv_conf() {
cat  /etc/resolv.conf EOF
search mydomain.net
nameserver 192.168.52.1
EOF
}

===8-

Of course, you could also just define make_resolv_conf() as an empty
function and it will just leave the current /etc/resolv.conf alone.

/dwight
-- 
Dwight N. Tovey
email: [EMAIL PROTECTED]
-
Work to Live : Live to Ride : Ride to Work



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] [Fwd: Samba-3 By Ex Chapt 3]

2005-07-06 Thread Dwight Tovey

Dwight Tovey said:

 Eric Hines said:
 Yes, I am--or at least I think so; the daemon is running, and it's
 configured according the the Chapt 3 example.  The /etc/resolv.conf
 file
  says it's written by /etc/dhclient-script, so I disabled that file,
 adjusted the resolv and tried again.  No effect.  Also, during reboot,
 when dhcpd started up, I got the error message Not configured to
 listen
  on any interface.  Wrote 5 new leases.  When the reboot completed, I
 had no Internet connection whatsoever.  I had to re-enable
 dhclient-script and reboot.

 So I remain with the problems that I have no DNS resolution
 capability, and I cannot edit, with permanence, /etc/resolv.conf.  I'd
 probably be satisfied with the latter if I could get DNS to work.


 You need to understand the difference between dhcpd and dhcpcd.  dhcpd
 is the server that provides network configuration information to other
 clients out on the network.  dhcpcd is the client part that requests
 that configuration info from the server.  If the other machines on your
 internal network have static IP addresses, then you don't need to be
 running dhcpd.  However, you probably do want to run dhcpcd on your
 gateway machine because it gets the network config info from your ISP.


And before anybody else notices the big chunk that I left out, Eric is not
running dhcpcd.  That client has been replaced by 'dhclient'.  You need to
run that on your Internet interface to get the IP configuration info from
your ISP (with the hook that I gave before to ignore the resolv.conf
part).  If you want the machines on your internal intranet to be
configured via dhcp, then you may run 'dhcpd' on the internal network
interface to serve them.

Hope I didn't cause too much confusion before.

/dwight
-- 
Dwight N. Tovey
email: [EMAIL PROTECTED]
-
Work to Live : Live to Ride : Ride to Work



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] [Fwd: Samba-3 By Ex Chapt 3]

2005-07-06 Thread Eric Hines
I tried both versions of /etc/dhclient-enter-hooks below, and in each 
case, following a reboot my /etc/resolv.conf was overwritten to its 
original form by dhclient-script. 

Unless this is related to my DNS functionality, which I've written IAW 
BYEXAMPLE Chapt 3 (although, apparently not, as it doesn't work), not 
working, I'd just as soon focus on that, for the time being.  Thanks for 
all the help on /etc/resolv.conf, though, that most assuredly was not 
time wasted.  It'll be useful when I come back to this problem.


Eric Hines

Dwight Tovey wrote:


Eric Hines said:
 


snip
So I remain with the problems that I have no DNS resolution capability,
and I cannot edit, with permanence, /etc/resolv.conf.  I'd probably be
satisfied with the latter if I could get DNS to work.

   


You can tell dhclient to get the IP address and gateway info, but to
ignore what the server tells it to do for the DNS server.  Look at the man
pages for dhclient-script.  If you create an executable script called
/etc/dhclient-enter-hooks and in there define the function
'make_resolv_conf()', you can override how your /etc/resolv.conf gets
handled.  I have one on a FC3 machine at home.  I can't get to it at the
moment, but from memory I believe that you can do something like this in
dhclient-enter-hooks:

===8-
#!/bin/bash

make_resolv_conf() {
cat  /etc/resolv.conf EOF
search mydomain.net
nameserver 192.168.52.1
EOF
}

===8-

Of course, you could also just define make_resolv_conf() as an empty
function and it will just leave the current /etc/resolv.conf alone.

   /dwight
 



--
He can compress the most words into the smallest ideas of any man
I ever met.
 - Abraham Lincoln

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] [Fwd: Samba-3 By Ex Chapt 3]

2005-07-06 Thread Eric Hines

Geoff Scott wrote:


Eric Hines wrote:
 


Geoff,
   



What do your logs say about NT_STATUS_LOGON_FAILURE for the stuff below?

What type of sam are you running? Ldapsam / tdbsam ?
 

It's set for tdbsam.  I've not got that set up right, though, according 
to the smbd log.  I've frankly walked away from this problem, though, 
until I get DNS resolution running.  My WINS does seem to be, tested 
with nsswitch set solely to wins.  Now it's set back to hosts: files dns 
wins.  I've been in log.nmbd, log.smbd, log.winbindd, and smbd.  Smbd 
yells about Unable to open TDB rid database!  There's a pretty clear 
hint; I just haven't had time to pursue it.



There was a thread titled logon.bat that started a bit before this
one. Have a look at that for example logon script settings.


I'm studying that, too.  That may help with my logon problem, but it
doesn't address my DNS problem. 


When I run the logon.bat file from my Win2k box, I get the following
in a DOS window: 


   net time \\lserver1 /set /yes
   System error 5 has occurred.


I'd guess that would work if you had wins set in your nsswitch
 


It is, though: hosts: files dns wins


   Access is denied.

   net use h: /home
   The user's home directory has not been specified.
   


Well that's just clearly wrong.  As John said in that post I mentioned:
net use o: %LOGONSERVER%\sharename
Or 
net use o: \\lserver1\sharename


But none of those is going to work unles name resolution is working.
Particularly wins for this example.
 

Agree on both.  I still need to study John's post, but I'm concentrating 
on getting DNS to work for now.  WINS does seem to be working.



Regards Geoff Scott


Thanks
Eric Hines

--
He can compress the most words into the smallest ideas of any man
I ever met.
 - Abraham Lincoln

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] [Fwd: Samba-3 By Ex Chapt 3]

2005-07-05 Thread Eric Hines
One more thing I forgot to mention.  The chapter calls for editing 
/etc/resolv.conf, but in my case it won't stay edited--it keeps getting 
set back to an original form (for searching my ISP) on every reboot.


Thanks again.

Eric Hines

 Original Message 
Subject:Samba-3 By Ex Chapt 3
Date:   Tue, 05 Jul 2005 17:47:09 -0500
From:   Eric Hines [EMAIL PROTECTED]
To: Samba samba@lists.samba.org



I guess I'm ate up with dumb because I'm having a great deal of 
difficulty with this chapter.


I'm running Samba v 3.0.14a on an FC3 machine.  I've got two basic 
problems: one centers on my DNS set up and the other is an authenticated 
logon problem.  With /etc/nsswitch.conf set to hosts: dns, I cannot 
ping my samba server--Host not found. Nor does host 
lserver1.test.biz (which appears in my /etc/hosts file) resolve the 
name (incidentally, host -f ... just tells me the f is an illegal 
option).   WINS seems to resolve OK (at least the test for that in the 
chapter passes).  I've checked my files several times, and I can find no 
error in them. 

The other problem is running smbclient //lserver1/accounts -U ehines.  
I'm invited to give the password, so that part is OK, but when I do, I 
just get an NT_STATUS_LOGON_FAILURE message.  ehines is the owner of 
accounts and a member of the group that owns accounts.  I think this 
goes back to my logon file in /scripts (per the smb.conf set up), but 
I'm clueless as to what should be in that file.  That file currently has 
the following contents:


   net time \\lserver1 /set /yes
   net use h: /home
   net use p: \\lserver1\accounts


Any help on these two would be greatly appreciated.

Eric Hines

--
He can compress the most words into the smallest ideas of any man
I ever met.
 - Abraham Lincoln


--
He can compress the most words into the smallest ideas of any man
I ever met.
 - Abraham Lincoln

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


RE: [Samba] [Fwd: Samba-3 By Ex Chapt 3]

2005-07-05 Thread Geoff Scott
Eric Hines wrote:
 One more thing I forgot to mention.  The chapter calls for editing
 /etc/resolv.conf, but in my case it won't stay edited--it keeps
 getting set back to an original form (for searching my ISP) on every
 reboot.   
 
Use the GUI tools if you don't want to go hunting around for the config
files that control everything.  That is assuming that there is such a tool
that deals with your resolve order.  I wouldn't know myself, I have chosen
Debeian for it's usually straightforward layout.

 Thanks again.
 
 Eric Hines
 
  Original Message 
 Subject:  Samba-3 By Ex Chapt 3
 Date: Tue, 05 Jul 2005 17:47:09 -0500
 From: Eric Hines [EMAIL PROTECTED]
 To:   Samba samba@lists.samba.org
 
 
 
 I guess I'm ate up with dumb because I'm having a great deal of
 difficulty with this chapter. 
 
 I'm running Samba v 3.0.14a on an FC3 machine.  I've got two basic
 problems: one centers on my DNS set up and the other is an
 authenticated logon problem.  With /etc/nsswitch.conf set to hosts:
 dns, I cannot ping my samba server--Host not found. 

There shouldn't be any comma in there it should be :

hosts:  files dns wins

Where are you pinging from? From your windows workstation? From the server?

 Nor does host
 lserver1.test.biz (which appears in my /etc/hosts file) resolve the
 name (incidentally, host -f ... just tells me the f is an illegal  
 option).   WINS seems to resolve OK (at least the test for that in the
 chapter passes).  I've checked my files several times, and I can find
 no error in them. 
 

For what is below, are you doing this from your test server as well?

 The other problem is running smbclient //lserver1/accounts -U ehines.
 I'm invited to give the password, so that part is OK, but when I do,
 I just get an NT_STATUS_LOGON_FAILURE message.  ehines is the owner
 of accounts and a member of the group that owns accounts.  I think
 this goes back to my logon file in /scripts (per the smb.conf set
 up), but I'm clueless as to what should be in that file.  That file
 currently has the following contents: 
 
 net time \\lserver1 /set /yes
 net use h: /home
 net use p: \\lserver1\accounts
 
 
 Any help on these two would be greatly appreciated.
There was a thread titled logon.bat that started a bit before this one.
Have a look at that for example logon script settings.



Regards Geoff Scott
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] [Fwd: Samba-3 By Ex Chapt 3]

2005-07-05 Thread Chris Nicholls
Are you using dhcp to get an IP address on that server? 

Every time dhcpcd gets an IP address it overwrites the resolv.conf.  So 
I think that's why it's changing every time you reboot. dhcpcd can be 
run with the -R option to prevent it from overwriting resolv.conf (check 
out the dhcpcd man page).   I'm not sure where you'd specify that as i 
don't use FC.  But it's probably easier to just give that machine a 
static IP.


Chris


Eric Hines wrote:

One more thing I forgot to mention.  The chapter calls for editing 
/etc/resolv.conf, but in my case it won't stay edited--it keeps 
getting set back to an original form (for searching my ISP) on every 
reboot.


Thanks again.

Eric Hines

 Original Message 
Subject: Samba-3 By Ex Chapt 3
Date: Tue, 05 Jul 2005 17:47:09 -0500
From: Eric Hines [EMAIL PROTECTED]
To: Samba samba@lists.samba.org



I guess I'm ate up with dumb because I'm having a great deal of 
difficulty with this chapter.


I'm running Samba v 3.0.14a on an FC3 machine.  I've got two basic 
problems: one centers on my DNS set up and the other is an 
authenticated logon problem.  With /etc/nsswitch.conf set to hosts: 
dns, I cannot ping my samba server--Host not found. Nor does host 
lserver1.test.biz (which appears in my /etc/hosts file) resolve the 
name (incidentally, host -f ... just tells me the f is an illegal 
option).   WINS seems to resolve OK (at least the test for that in the 
chapter passes).  I've checked my files several times, and I can find 
no error in them.
The other problem is running smbclient //lserver1/accounts -U ehines.  
I'm invited to give the password, so that part is OK, but when I do, I 
just get an NT_STATUS_LOGON_FAILURE message.  ehines is the owner of 
accounts and a member of the group that owns accounts.  I think this 
goes back to my logon file in /scripts (per the smb.conf set up), but 
I'm clueless as to what should be in that file.  That file currently 
has the following contents:


   net time \\lserver1 /set /yes
   net use h: /home
   net use p: \\lserver1\accounts


Any help on these two would be greatly appreciated.

Eric Hines



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba