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/shadow home 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 NO...