Pages

Saturday, December 3, 2011

Migrating /etc/protocols into LDAP

The file /etc/protocols contains information about the protocols and their numbers. To be honest, until I tried to put every database into LDAP  that getent can handle I did not recognized or cared about the file /etc/protocols...
Before you continue reading keep in mind that I had serious trouble with my server while looking up for /etc/protocols in my LDAP. Currently I don't use it anymore just like my prior released article about migrating /etc/services into LDAP.

Migrating /etc/services into LDAP

Before you continue reading you should know that migrating /etc/services into LDAP may refuses your system to boot. I had plenty of trouble with /etc/services in LDAP, that is why I don't use it anymore. The next point is that you may use different operating systems. In this case the content of /etc/services may differ. When I take a look at /etc/services in Slackware, I have three entrys for port 1: 

Tuesday, November 29, 2011

Migrating /etc/rpc into LDAP

If you are using any rpc service like NFS or NIS then you probably know the command rpcinfo. With rpcinfo you can get all rpc servives running on a remote host:

# rpcinfo -p dc01
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
...

Monday, November 28, 2011

Available, used and free memory in HP UX

To see how much memory is consumed in HP UX use swapinfo:

# swapinfo -tam
            Mb      Mb      Mb   PCT  START/      Mb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev       16368    1252   15116    8%       0       -    1  /dev/vg00/lvol2
reserve       -   15116  -15116
memory    16354   15707     647   96%
total     32722   32075     647   98%       -       0    -

Sunday, November 27, 2011

LDAP N-Way Multi-Master Replication

When you are using OpenLDAP for any reason then you should think about replication. With replication you have to setup minimum two LDAP servers. If one of your LDAP servers accidently shuts down then the other will take over. If you add content (or remove content) then you have to do it only once, the other server will get the new content by replication. Before you can use replication you have to setup a ntp server (not shown here). It is very important that both LDAP servers are usingthe same time. Also make sure that both server always know each other by FQDN. My current setup looks like this:

Friday, November 25, 2011

Creating a Slackware package

This article is outdated. See Slackware package management for a newer version.

Creating a Slackware isn't a hard job. In contrast to rpm or deb it is very easy. In this article I will show you how to compile a small (but very cool) piece of software, how to create a appropiate directory structure and finally how to create a Slackware package that you can install and remove with the default tools installpkg and removepkg. To show you how to create a Slackware package I will use Lua but you can use what ever you want. Lua is a very small and easy to compile piece of software and should work out of the box. First get the software: 

Sunday, November 13, 2011

Migrating /etc/networks into LDAP

If you are using /etc/networks than you can move it into your LDAP. First take a look at your /etc/networks:

# cat /etc/networks
loopback        127.0.0.0
example.com     192.168.1.0
example2.com    192.168.2.0

Migrating /etc/ethers into LDAP

If you are using /etc/ethers than you can move it into your LDAP. First take a look at your /etc/ethers:

# cat /etc/ethers
00:1B:21:02:96:56    192.168.1.70
00:30:05:c5:2a:ba    192.168.1.73
98:FC:11:79:37:76    192.168.1.69

Migrating /etc/hosts into LDAP

If you are using /etc/hosts than you can move it into your LDAP. First take a look at your /etc/hosts:

# cat /etc/hosts
127.0.0.1        localhost
192.168.1.70     blog01
192.168.1.73     dc01
192.168.1.69     wlan01

Backing up and restoring your LDAP

If you're using LDAP with BDB backend then you have two chances to backup your LDAP server:

1. from any client via ldapsearch
2. on the LDAP server via slapcat