Koozali.org: home of the SME Server

fixing the pc0001.domain.com issue

lilkev

fixing the pc0001.domain.com issue
« on: March 12, 2007, 05:26:55 AM »
Hi all

I havent used SME for a while. Back in sme 6.0 there was a contrib available that once installed allowed machines to have their hostname appended to the domain info rather than just a random pc0001 etc.

DOes anyone know if there isa similar contrib for SME 7? If not will the one from 6 work? If so where can I find it.

Many thanks

Kev

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: fixing the pc0001.domain.com issue
« Reply #1 on: March 12, 2007, 08:32:04 AM »
Quote from: "lilkev"
Hi all

I havent used SME for a while. Back in sme 6.0 there was a contrib available that once installed allowed machines to have their hostname appended to the domain info rather than just a random pc0001 etc.

DOes anyone know if there isa similar contrib for SME 7? If not will the one from 6 work? If so where can I find it.

Many thanks

Kev
I don;t know of a contrib for SME7, but I know you can also specify each hostname (I know it is a lot of work) in the server-manager domain and hostname panel, this will also resolve the hostname for each host entered there.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline elmarconi

  • ***
  • 139
  • +0/-0
Re: fixing the pc0001.domain.com issue
« Reply #2 on: March 12, 2007, 12:51:13 PM »
Quote from: "lilkev"
I havent used SME for a while. Back in sme 6.0 there was a contrib available that once installed allowed machines to have their hostname appended to the domain info rather than just a random pc0001 etc.

Does anyone know if there isa similar contrib for SME 7? If not will the one from 6 work? If so where can I find it.


http://www.activeservice.co.uk/sme/contribs/
or http://freshmeat.net/projects/dhcp-dns/

Haven tried it yet on SME7
...

Offline coza

  • 5
  • +0/-0
Re: fixing the pc0001.domain.com issue
« Reply #3 on: April 10, 2008, 03:03:10 PM »
BUMP

This would help me too,

has anyone tried this old contrib, or does anyone have a different solution, besides manually adding the hotnames in dns ?


Offline tspoon1986

  • *
  • 33
  • +0/-0
Re: fixing the pc0001.domain.com issue
« Reply #4 on: April 18, 2008, 07:57:35 AM »
http://www.activeservice.co.uk/sme/contribs/
or http://freshmeat.net/projects/dhcp-dns/

I haven't tried these either. I believe both of these solutions are designed to run on machines that are both the DHCP and DNS server. My DNS and DHCP servers are two separate servers. I'd love to eliminate the pc0001 problem as well! I've posted at http://forums.contribs.org/index.php?topic=40738.0 but will be monitoring this thread as well. Anyone come up with anything?

Offline elmarconi

  • ***
  • 139
  • +0/-0
Re: fixing the pc0001.domain.com issue
« Reply #5 on: April 26, 2008, 10:24:13 PM »
I haven't tried these either. I believe both of these solutions are designed to run on machines that are both the DHCP and DNS server. My DNS and DHCP servers are two separate servers. I'd love to eliminate the pc0001 problem as well! I've posted at http://forums.contribs.org/index.php?topic=40738.0 but will be monitoring this thread as well. Anyone come up with anything?

Did take a closer look:
Indeed the above mentioned contrib requires DNS and DHCP on the same machine. One could probably do some fancy scripting parsing the leases file with SSH or so, but I'll leave that to the codemasters.

What I did was use the 70genericHostARecords out of the previous contrib (MC is your friend), do a little modification:
Replace line 25: $OUT .= "=$host.$DomainName:$ip:0:$exptime\n";
with              : $OUT .= "=$host.$DomainName:$ip\n";

Next: service tinydns restart
You probably want to call this in a crontab or so.
The original contrib set up a service which watched the /var/lib/dhcp/dhcpd.leases file

Now you don't resolve to pc0060 anymore if one calls "host 192.168.1.60"

Hth.
...

Offline juniper

  • 2
  • +0/-0
Re: fixing the pc0001.domain.com issue
« Reply #6 on: July 12, 2008, 12:26:00 PM »


http://www.activeservice.co.uk/sme/contribs/
or http://freshmeat.net/projects/dhcp-dns/

Haven tried it yet on SME7

I have tried to install

http://www.activeservice.co.uk/sme/contribs/sme-dhcp-dns-1.0-1.noarch.rpm

I have been testing for couple of days and it seems that it works fine.

But I can't understand why this synchronization is not included to the fresh installation of SME Server? Is there any specific reason for that (like name resolution or networking speed issues)? I am using SARG to monitor internet activities in my network with nearly 60 clients, it is annoying to investigate who is pc-00xxx all the time. And I don't really want to assign hostnames manually, prefer dynamic ips.

Offline brianr

  • *
  • 988
  • +2/-0
Re: fixing the pc0001.domain.com issue
« Reply #7 on: July 13, 2008, 07:41:22 AM »
Tried this on sme 7.3 (completely up to date) and got it:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Running Transaction
smeserver trap pre-install: sme-dhcp-dns
  Installing: sme-dhcp-dns                 ######################### [1/1]
patching file /etc/e-smith/web/functions/hostentries
Hunk #1 FAILED at 118.
1 out of 1 hunk FAILED -- saving rejects to file /etc/e-smith/web/functions/hostentries.rej
Refer to /usr/share/doc/sme-dhcp-dns-1.0 for further information
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


I guess the patch failed. i am missing the point of patching that particular file anyway
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: fixing the pc0001.domain.com issue
« Reply #8 on: July 13, 2008, 11:28:02 AM »
I guess the patch failed. i am missing the point of patching that particular file anyway
RPM's that apply patches are a very bad thing as it is modifying core files. You should not install this contrib as there is no way of properly reverting when removing this contrib.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline brianr

  • *
  • 988
  • +2/-0
Re: fixing the pc0001.domain.com issue
« Reply #9 on: July 13, 2008, 11:32:12 AM »
You should not install this contrib as there is no way of properly reverting when removing this contrib.

agreed.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline juniper

  • 2
  • +0/-0
Re: fixing the pc0001.domain.com issue
« Reply #10 on: July 15, 2008, 05:26:57 PM »
I guess the patch failed. i am missing the point of patching that particular file anyway

I have traced what this contribs do. It starts a service named "dhcp-dns". This service continuously monitor the file "/var/lib/dhcp/dhcpd.leases". If this file is changed, this service triggers "signal-event dhcp-change" command and updates the DHCP-dependent A Records parts of the file "/var/services/tinydns/root/data" by using the dhcp data where pc-00xxx hostnames were listed formerly and logs the dhcp change time. Therefore, it synchronize the dns records by using dhcp leases.

Actually I don't know the importance of patching this file but you may apply this patch manually since it tries to change a single line which is not in the specified position.

What I wonder is whether there is any inconvenience in this procedure or not. If the file "var/services/tinydns/root/data" is used in the name resolution of an ip address, it should work fine. However, there are some issues that I am currently working on. First, "ping /a x.y.z.d" command from a windows workstation can correctly resolve the hostname however not as fast as the previous case. Second, my problem with the SARG has not been solved since it reports the ip address now instead of hostnames. This problem can come from SARG and I am working on it.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: fixing the pc0001.domain.com issue
« Reply #11 on: July 15, 2008, 07:11:38 PM »
I think your problem with SARG would be fixed by using IDENT (search for it at Google). AFAIK IDENT must be running on workstation so you can do it from netlogon script on server or autoexec-type-of-file on workstation (if not doing logon at domain!).

Jáder
...