Howto enable Unix Attributes in Windows 2003 R2

With the latest version of Windows Server 2003 R2 it is no longer needed to install Windows Services for UNIX, since this is now a part of Windows Server 2003, though not enabled by default.

To enable it open Control Panel -> Add or Remove Programs. Now click on Add/Remove Windows Components. Double click on Active Directory Services and select Identity Management for Unix.

After this… surprise… you have to restart the Windows Server :-D

Now you should be able to see the “Unix Attributes”-tab when looking on properties for a user.

Free VMware server on SLES10 minimum install

First install a minimum SLES10 (only using selectiong Server Base).

I have a few issues with the minimum install thing in SLES10 (I had kind of the same feeling with SLES9):

  1. Why do I have to use CD2 to install a 76 kilobyte Zenwork Managemnet Daemon. Why not put it on CD1? It seems really lame that you cannot make a minimum install with CD1.
  2. No I really don’t want the Network Mmanager to manage my ethernet interface on my server… I want to give it a static ip. Ahhh I can disabled it. But why do SLES10 still want to install the network-manager package?… and worse all its dependencies is the reason why I choose the minimum install in the first place. Luckily after the install you can choose to use the old way of configuring network from within YAST.

Besides from that SLES10 have so far made a good impression on me.

I usually turn off the services slpd and portmap.

Preparing server for VMware

Extra packages needed:


Now install the the free VMware Server from

Large SD card hangs Ubuntu Edgy

Damn… never brag about uptime :-(

Today I received a 2GB SD card which I’m going to use to store ssh and gpg keys on. Of cause I’m going to encrypt it like I wrote about some days ago. When I inserted the SD card into my laptop everything just froze… it guess I’m hit by bug #61758. Ubuntu Edgy uses kernel 2.6.17 which seems to be affected by this bug. It should be fixed in 2.6.18 though.

I’ll try to patch my kernel module… god I hoped those days where over. Exciting to see if I can even remember how to do it. I hope this gets fixed soon, life is to short to compile kernel modules. My laptop should just work.

Solution to vmnet1 down after suspend

I rarely shut down my laptop, but I use suspend all the time. Right now I have like 14 days of “uptime” which would have been a lot more if it wasn’t because I just installed Edgy :) I have VMware Server installed on it which I use for my work. I have all the machines on a host only network which works just great. But every time I suspend my laptop the virtually device vmnet1 seems to “go down” and I have to make a:

sudo ip link set vmnet1 up

to be able to connect from my laptop to the VMware machines again.

Now I created a file at the following location:


With the following content:


ip link set vmnet1 up

Now I don’t have do it manually any more, horay :-D

Using PHP to connect to an Active Directory

I am looking into authenticating users on Solaris 9 via Active Directory (AD) as an LDAP server. To chop the problem into smaller problems I started to try and connect to the LDAP interface of the AD from a platform which I know. I’m no Solaris expert :)

So I installed Ubuntu edgy (server install from alternative CD) and a evaluation Windows 2003 R2 server in the free VMware Server product. Then I install an Active Directory (and a DNS server) on the Windows Server. The I tried to connect to the AD with PHP scripts to test how it worked. I found a good article on about PHP LDAP connections to AD. I also found an article about various handy LDAP search filters for Active Directory.

First create a normal Windows user in the AD which you use to connect to the AD with. You don’t need to add this user to any special groups to allow it to connect to the AD. Just a plain normal user. You might wanna disable password expiration if you are gonna use it in a production environment :)

The I made a php script on my Ubuntu server somewhat like the following:


Trouble shooting

49: Invalid credentials

Remember when you tell PHP script which user you want to connect with, also supply the realm in which the user resides. In my test setup I used my own user je (Jacob Emcken), and my realm which means I’m connecting with to LDAP with the following user:

1: Operations error

This error can come from to things:

  1. You have used DN instead of DC in you distinct name:

    DN=testdomain,DN=com (didn't work for me)

    This worked for me:

  2. You get this if you are trying to search the root of the tree and you haven’t set the following:

    ldap_set_option($ldap_connect_resource, LDAP_OPT_REFERRALS, 0);