The eternal fight between admins and computers

(and very often users, as well)

Archive for October, 2007

Windows 2003 DHCP/DNS server and non-Windows clients

Posted by Vide on October 25, 2007

Usually, in a 100% Microsoft environment, DHCP that automagically updates the DNS entries for every new DHCP client in the network is not a problem, since every client is part of the Active Directory and every machine as by default the rights to “talk” to the DNS server and tell it which is the client’s new IP address and hostname.

But if you have other clients in your network (for example Linux, FreeBSD, embedded devices like JetPrint etc) that need DHCP and you want automatic DNS update, this will not work because they don’t have the rights to write in the DNS records list.

To solve this problem, the update has top be done by the DHCP server itself, and to do the trick you have

  • Go to an AD user management snap-in
  • Create a new user called, for example, dhcp2dns and make it member of the DnsUpdateProxy group
  • Give a password to the dhcp2dns user
  • Go to the DHCP snap-in, and select the server you want to configure
  • Right click on the server name /address, and select properties
  • Here, select the DNS tab
  • Tick the Enable DNS dynamic updates checkbox
  • Select Always dynamically update DNS A and PTR records
  • Now, select the “Advanced” tab and click the “Credentials” button
  • Here, put the credentials of the dhcp2dns user you have created in the first steps

and you are done, it should work or, at least, it did work for me :)

Posted in Active Directory, Networking, Tips, Windows 2003 | Tagged: , , , , | 6 Comments »

Windows Update Hotfix KB915800 (msn search bottom bar)

Posted by rga on October 25, 2007

Hello,

We use Microsoft server update services (aka wsus) to update our Windows Update repository to save bandwith, since it is installed via LAN.

Today our users tell us that ‘msn search’ appears at bottom of the bar, seeing the updates history this crap is installed by a Hotfix that reinstall msn search if you don’t have one before …

No one want to use this silly search engine but redmon guys insist.

http://support.microsoft.com/kb/915800

More info here:

http://it.slashdot.org/article.pl?sid=07/10/25/1230223

See you!

EDIT:
It seems that finally Microosft recognizes the error on one WSUS developer’s blog, and there is even a couple of methods to remove the mosta unwanted and hated update in WSUS history.

Posted in Windows, Windows 2003 | 2 Comments »

VMware strange error message

Posted by rga on October 23, 2007

Hello,

Since VMware is not FreeSoftware no one have to get source code and see why it shows this strange message, of course only for fun.

Using vmrun shell script to manage our virtual machines, someone can see something like this:

$ vmrun snapshot Snap1.vmx Snap2.vmx
all seems to work but …

Error: Command failed: The operation completed successfully.

Nice tool :)

Posted in General | Leave a Comment »

HUDlite-server is crap

Posted by Vide on October 18, 2007

HUDlite-server, part of HULite which is a tool to monitor and manage queues and agents in a Asterisk based callcenter, is pure crap. It’s a perl-thing but closed source 8with perl2exe) which simply doesn’t work if not installed by default in a Trixbox environment. There is only an RPM for CentOS available to download (after you manage to pass the broken link they have on their website), which doesn’t even correct RPMs dependencies in it!! It requires for example perl-POE but it doesn’t complain at install time, it only throws you an error the first time you try to execute it manually (because the init.d script has a faboulos 2> /dev/null…. are you idiot or what?). Then, after you have fullfilled all the dependency, it silently dies after a few seconds, and all you can find out from a strace is

rt_sigaction(SIGHUP, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
stat64("/usr/lib/libtb.so", 0x813b428) = -1 ENOENT (No such file or directory)
open("/usr/lib/libtb.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/var/adm/bin/astwatch.pl", 0x813b428) = -1 ENOENT (No such file or directory)
pipe([3, 4]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x5f8708) = 3555
close(4) = 0
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
waitpid(3555, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 3555
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
read(3, "", 4) = 0
close(3) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x5f8708) = 3557
unlink("/tmp/p2xtmp-3549/Util.so") = 0

where the only useful piece of information is this libtb.so and astwatch.pl missing, but I have really no clue (after 1+ hour spent googling) where to find them and if they will solve my problem. So…

rpm -e hudlite-server

and I don’t want to see anymore this crap in my life. Fonality: you sucks, you have no clue about what this open-source thing is and how to have a growing community of happy users. All you want to do is suck milk from your customer with minimal effort.

Posted in Rants | Tagged: , , , , | 5 Comments »

Linux 2.6.x as real server in a LVS system

Posted by Vide on October 15, 2007

DISCLAIMER: this is not an howto, it’s just a reminder for myself and a tip for someone who already knows LVS (Linux Virtual Server) basics.

So, if you need to use a Linux as a real server behind a LVS and you’re using kernel 2.6.x, you will know that if you try a

ifconfig lo:0 192.168.1.131 -arp netmask 255.255.255.255 up

then arping from an external host will be answered ANYWAY by your host, and this is a VERY BAD THING in an LVS environment (cause the client will contact directly only one real server and will not pass always through the virtual server). This could seem a bug cause we are using the -arp switch in ifconfig which should tell the kernel to ignore the ARP replies for this IP.
To solve this problem, you have to change these kernel settings with sysctl:

net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.eth0.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2

in sysctl.conf (you can use sysctl net.ipv4.conf.eth0.arp_ignore=1 for example if you want to give it a try before).

With these parameters set, if you try to arping the lo:0 IP address from an external host, it won’t answer, but nonetheless your real server will accept the packets sent by the director of the LVS system.

I’ve tried this in Debian.

Posted in Debian, LVS, Networking, Tips | Tagged: , , , | Leave a Comment »

Obtain the Dell service tag in FreeBSD/Debian/Gentoo

Posted by Vide on October 10, 2007

Well, the title could be a little misleading cause this actually works in Linux and with other manufacturer as well, but since we were searching info for this particular topic, and didn’t manage to find anything useful on Google…

Anyway, it’s very very simple. All you have to do is install dmidecode (from Alan Cox) with:

FreeBSD

portinstall dmidecode

or whatever manner you use to install FreeBSD’s ports :)

Debian/Ubuntu

apt-get install dmidecode

Gentoo

emerge dmidecode

NOTE: this work as well with HP servers’ serial numbers and, I suppose, with IBM, Sun etc too.

Once installed, all you have to do is execute

# dmidecode -s chassis-serial-number

et voilĂ , you will get your service tag printed on screen. Moreover if your server is in the datacenter and you cannot remember the exact model

# dmidecode -s system-product-name
PowerEdge 1750

for example.

Just a note: dmidecode is the program used by OCS Inventory client to collect all these data.

Posted in Debian, FreeBSD, Gentoo, Linux, Tips, Ubuntu | Tagged: , , , , , , | Leave a Comment »

Google Apps with djbdns

Posted by rga on October 9, 2007

Hello,

If you have your own domain with registrar services and you want to use you mail domain using google services like google apps http://www.google.com/a you only need to set up fine your DNS setup and to read some steps detailed by google.

Here is and example using tinydns to use google apps:

# yourdom = Your Domain :)
.yourdom.com:ip:ns1.dom.com:259200
.yourdom.com:ip2:ns2.dom.com:259200
# to google APS mx
Cgoogle6879112e21eab44.yourdom.com:google.com:3600
@yourdom.com::aspmx.l.google.com.:1:3600
@yourdom.com::alt1.aspmx.l.google.com.:5:3600
@yourdom.com::alt2.aspmx.l.google.com.:5:3600
@yourdom.com::aspmx2.googlemail.com.:10:3600
@yourdom.com::aspmx3.googlemail.com.:10:3600
@yourdom.com::aspmx4.googlemail.com.:10:3600
@yourdom.com::aspmx5.googlemail.com.:10:3600
‘yourdom.com:v=spf1 a mx include72google.com,include72googlemail.com ~all:3600

Now, you can enjoy using google with you domain!

See you.

Posted in Linux, Tips, Unix | Leave a Comment »

Map a fake drive letter to a folder with subst.exe

Posted by Vide on October 8, 2007

We all know that aberration called “Drives letters” in Windows, a present from the old DOS days. So, maybe you are interested in how to map a fake drive unit (let’s say N:) to an existent folder (for example, C:\Windows).

It’s really easy with substr.exe, all you have to do (once you know this program does exist, naturally) is:

subst N: C:\windows

now if you enter in N: you will see the Windows folder’s contents. This is done on a per-user basis (every user can have its N: pointing to a different directory) and it disappears on the first reboot.
If you want to have it permanent, there is a really nasty and hidden trick, creating a new key in the registry.
You have to go to

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices

and there create a key named with the drive letter you want, colon included (N: in our example) and with this value:

\??\c:\\windows

you can obviously change c: and windows for whatever folder you want, but remember to double the backslash after the unit letter, because it won’t work with a single backslash.
Reboot and enjoy your new N: :)

Posted in Tips, Windows, Windows 2003 | 9 Comments »

Deleting non-free Software from Debian GNU/Linux

Posted by rga on October 5, 2007

Hello,

If you use Debian or Debian based like Ubuntu, you can check if you have installed non-free software via Debian way. By Default Debian does not install it unless you put non-free on your apt repo, so delete it first if it exists.

Install the tool vrms (virtual Richard M. Stallman)

# apt-get install vrms

or

# aptitude install vrms

Then, delete all non-free software, mandatory if you want to be a 100% Free Software guy, also to make happy RMS :)

# apt-get remove –purge `vrms -s | xargs echo -n && echo`

or

# aptitude purge `vrms -s | xargs echo -n && echo`

See you!

Posted in Debian, Tips, Ubuntu | Leave a Comment »

Ethernet bonding in Debian Etch

Posted by Vide on October 2, 2007

UPDATE: This works only with Debian Etch, cause in Lenny update-modules is deprecated!

If you want to enable bonding in Debian, for example to have high-availability of your network interfaces, these are the quick steps you have to do:

# apt-get install ifenslave-2.6

edit /etc/network/interfaces to look like this:

auto bond0
iface bond0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
up /sbin/ifenslave bond0 eth0 eth1

then, add this line to /etc/modprobe.d/aliases:

alias bond0 bonding

and issue
# update-modules

Stop the old eth0 interface with

# ifconfig eth0 down

(do not use ifdown cause it reads /etc/network/interfaces that no long knows anything about eth0)

and finally start the new bonded interface with

# ifup bond0
OR
# /etc/init.d/networking restart

Posted in Debian, Networking, Tips | Tagged: | 3 Comments »