0

I'm pretty new to Enterprise Linux administration, and I need to find the best way to move user accounts and their /home directories to a new server. The current setup uses NFS to mount the /home and /var/www directories. I need to move everything to a local machine (so no more NFS).

My problem is that I can't seem to find anything relating to LDAP authentication and changing from NFS to locally mounted directories.

Would I be able to use rsync to move the /home and /var/www directories without totally screwing up the user permissions, or would i have to move the /etc/passwd and /etc/shadow directories too? I know that rsync offers a way to sync permissions, but I'm worried that since we authenticate with LDAP, it might somehow change the UID/GID of the users that are getting moved.

Thanks.

1 Answer 1

0

This assumes that your LDAP is currently functional on the new system and that users/groups appear to be correct already. If not, you'll need some LDAP help. The files being local or remote shouldn't matter to the system it's mounted on (as far as LDAP is concerned).

mkdir -p /home.local
mkdir -p /var/www.local
rsync -av --progress /home/* /home.local/
rsync -av --progress /var/www/* /var/www.local/

Stop your webserver.

umount /home
umount /var/www
mv /home /home.old
mv /var/www /var/www.old
mv /home.local /home
mv /var/www.local /var/www

Then edit your /etc/fstab to remove the NFS mounts permanently.

Start your webserver.

2
  • Thank you! Dumb question though- If I needed to leave the old system up temporarily, just to make sure everything worked, could I leave the NFS mounted, since everything would be on the new system?
    – Ricky-Rose
    Jun 13, 2013 at 13:52
  • Yep, just at the step where it says to edit the /etc/fstab, change the mount points (instead of /home, /home.old; instead of /var/www, /var/www.old).
    – user143703
    Jun 13, 2013 at 14:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .