• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

Samba Server

I would like to setup a Samba PDC and have Win XP machines join to it. I am familiar with the entire process of creating the domain and joining and everything.

My question is that I would like when I join a winXP machine Samba would automatically create a record for it under DNS.(I will setup BIND on the same server) Is this possible?? how please ?

0
Monis Monther
Asked:
Monis Monther
  • 8
  • 3
  • 2
  • +1
2 Solutions
 
Jason WatkinsIT Project LeaderCommented:
Hi,

Hello Samba DC implementations typically do not rely on DNS. They, instead, rely on the SMB protocol (NetBIOS). DNS can be set up with BIND, but there is no out-of-the-box integration for automatic updates (DDNS).
0
 
Monis MontherSystem ArchitectAuthor Commented:
Hi Firebar I am aware of this, but what I want is (If I can do a similar job of what Windows AD does by updating DNS on the fly)
0
 
Jason WatkinsIT Project LeaderCommented:
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Duncan RoeSoftware DeveloperCommented:
You really want the same server to allocate IP addresses (i.e. run dhcp server) and run DNS (bind). Then the windows machines get their IP addresses from your server and you can configure your dhcp to update bind. SAMBA doesn't really enter into it.
If your windows systems have static IPs, configure them to bind.
0
 
Monis MontherSystem ArchitectAuthor Commented:
Hi Duncan:

Seems like an idea, dhcpd supports updating DNS records on bind, and actually I do have my DHCP on RHEL and was planning to have bind on it too so I will give it a try next week and feed you back

I also took a look on Samba4 development where it is now under alpha12 version, one of the key components will be DNS updates from SAMBA (actually Kerberos that will be automatically integrated with it).

Bottom line is that SAMBA CANNOT DO IT alone



0
 
Duncan RoeSoftware DeveloperCommented:
My home system does this, with mshome.net below. (local.net is static).
07:17:00$ cat /etc/dhcpd.conf 
option domain-name "mshome.net";
option domain-name-servers 127.0.0.1;
ddns-update-style interim;
ignore client-updates;

subnet 192.168.0.0 netmask 255.255.255.0
{
  range 192.168.0.5   192.168.0.119;
  range 192.168.0.121 192.168.0.254;
  max-lease-time 2592000;
  default-lease-time 604800;
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.0.255;
  option routers 192.168.0.120;
  option domain-name-servers 192.168.0.120;
}

07:18:18$ cat /etc/named.conf 
acl "locals" { 10.255.255.0/24; 192.168.0.0/24; 127.0.0.0/8; };
options {
  directory "/var/named";
  forward only;
  forwarders { 198.142.0.51; 203.2.75.132; };
  allow-transfer { none; };
  allow-query { "locals"; };
  allow-recursion { "locals"; };
};

zone "mshome.net" IN {
  type master;
  file "mshome.net";
  forwarders { };
  allow-query { "locals"; };
  allow-transfer { "locals"; };
  allow-update { 192.168.0.120; };
};
zone "0.168.192.in-addr.arpa" IN {
  type master;
  file "ten.emohsm";
  forwarders { };
  allow-query { "locals"; };
  allow-transfer { "locals"; };
  allow-update { 192.168.0.120; };
};
zone "local.net" IN {
  type master;
  file "local.net";
  forwarders { };
  allow-query { "locals"; };
};
zone "255.255.10.in-addr.arpa" IN {
  type master;
  file "ten.lacol";
  forwarders { };
  allow-query { "locals"; };
};

Open in new window

0
 
Monis MontherSystem ArchitectAuthor Commented:
Hi Duncan:

Great Config, I will apply it this weekend hopefully, thanks for the contribution.

One question though, From where does the DHCP assign the name, I mean

Client will ask for IP
DHCP will assign IP to Client
DHCP will update the DNS  server with the new IP and ????? how will it know the name

IS this sequence corrcet ?? if not what is?? or does this mean you have to first time configure all A records under DNS manually then DHCP will start updating them??


Note: I am aware that the sequence I provided is not comprehensive and the network flow to get the lease envolves other steps, but just to break down the proccess simply.

Thanks again for your time
0
 
Duncan RoeSoftware DeveloperCommented:
Your sequence is right. dhcpc asks for the name but I'm not sure of the exact mechanism (I *think* it uses hostname)
IME Windows clients get the host name they ask for from a Linux server, but Linux clients don't get that from a Windows server
0
 
Monis MontherSystem ArchitectAuthor Commented:
Sorry for not responding for a while, the project was postponed a little bit , now we are back, in a few days I will post what was done, Thanks for the help
0
 
Monis MontherSystem ArchitectAuthor Commented:
Hi Duncan:

I tried the setup today and I got this error

journal file domain.com.zone.jnl does not exist, creating it
May 12 05:31:25 dc1 nss_wins[5864]: domain.com.zone.jnl: create: permission denied
May 12 05:31:25 dc1 nss_wins[5864]: client 172.16.0.11#46091: updating zone 'domain.com/IN': error: journal open failed: unexpected error
May 12 05:31:25 dc1 dhcpd: Unable to add forward map from Home-pc.domain.com. to 172.16.0.100: timed out


Do you have an idea?
0
 
Monis MontherSystem ArchitectAuthor Commented:
Hi Problem Solved

I will post the updates of what I did tomorrow as it is 3:15 in the morning here, after that I will assign points to both your solution and my added solution to complete the job

Thanks
0
 
Monis MontherSystem ArchitectAuthor Commented:
This is  the Full DHCP configuration to add both forward and reverse zone records for the domain

option domain-name "domain.com";
option domain-name-servers 172.16.0.11;
ddns-update-style interim;
ddns-updates on;
ddns-domainname "domain.com.";
ddns-rev-domainname "in-addr.arpa.";
ignore client-updates;


zone 0.16.172.in-addr.arpa. {
        primary 172.16.0.11;
}

log-facility local7;

subnet 172.16.0.0 netmask 255.255.255.0 {
  range 172.16.0.100 172.16.0.200;
  option subnet-mask 255.255.255.0;
  option domain-name-servers 172.16.0.11;
  option routers 172.16.0.1;
  option broadcast-address 172.16.0.255;
  default-lease-time 600;
  max-lease-time 7200;
}

0
 
Darr247Commented:
Just to clarify (for the solution database), http:#32695267 is from the DHCP dæmon's /etc/dhcpd.conf file, correct?
0
 
Monis MontherSystem ArchitectAuthor Commented:
Yes Correct
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

  • 8
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now