Posts

Showing posts from March, 2012

Samba Domain Controller Cluster Using Heartbeat and CentOS 6

In this segment, we would be creating a Samba Server Cluster using Heartbeat and CentOS 6.

First, we start by understanding, what is a server cluster? A server cluster is a collection of servers that provide similar network services. They share an IP address/FQDN and the client hosts communicate with that IP/FQDN to obtain network services. The part to notice here is that multiple servers are used for auto redundancy and in cases, load balancing. Which simply means, even if one of the servers are down, the other servers would take over and the client will get the services from the backup servers. The whole process is automatic and with proper configuration, seamless. The client wouldn't even know that it's using a backup server.

For example, let us assume that server 1 and server 2 have IP address of IP1 and IP2 respectively. Both of them are configured as web servers. We have an IP address IP3 that can be resolved to www.testdomain.com. So, to create an auto redundant cluster…

Migrating Samba Server and Users in CentOS 6

To migrate Samba users from one server to another, we will be needing to migrate the following -

/etc/passwd/etc/group/etc/shadowhome directories and shared directories/etc/samba/var/lib/samba We assume that we have two servers: old-server (192.168.10.10)  and new-server (192.168.10.20). Some of the commands are need to be run in the old-server and some need to be run in new-server.

Old Server:Backing up users, groups and passwords

[root@old-server ~]# mkdir /root/move [root@old-server ~]# export UGIDLIMIT=500 [root@old-server ~]# awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534)' /etc/passwd > /root/move/passwd.mig [root@old-server ~]# awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534)' /etc/group > /root/move/group.mig [root@old-server ~]# awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534) {print $1}' /etc/passwd | tee - |egrep -f - /etc/shadow > /root/move/shadow.mig  

NOTE: Please click here for expla…