LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   moving home directories of users onto remote machine (https://www.linuxquestions.org/questions/linux-newbie-8/moving-home-directories-of-users-onto-remote-machine-638088/)

shishirkotkar 04-26-2008 09:28 PM

moving home directories of users onto remote machine
 
hi friends..

this is what i am trying to do...

everytime i create a user on one linux machine , i want the home directory of that machine to be created onto a remote machine...ie i want the user to use the hdd space of the remote machine running another linux os..


is it possible?? how?

Tischbein 04-26-2008 09:44 PM

I imagine you just set up a filesystem such as nfs or samba on the remote machine and mount it as /home on the local machine.

Regards, Tischbein.

shishirkotkar 04-27-2008 12:11 PM

Quote:

Originally Posted by Tischbein (Post 3134106)
I imagine you just set up a filesystem such as nfs or samba on the remote machine and mount it as /home on the local machine.

Regards, Tischbein.

can you plz tell me how do i do that?

danboland 04-27-2008 02:20 PM

Setting up an NFS is fairly straightforward.


Some of the installation procedures might be system dependent, various Linux distribution and BSD install program differently. So make sure you and your host install NFS version 3 and the nfs−utils package. You will also need the services portmap, lockd, and statd running. (most linux distributions have these running by default)

In order to get it to work you have to configure both servers. In the following i will refer to the server which will house your content as the Server with address master.domain.com, and the server with Carma that you will mouth the NFS share on as the Client with address slave.domain.com. You should adjust the host names and domain name to the real names. You could also use IP addresses.

There is only one file an NFS server: /etc/exports. You should also edit /etc/hosts.allow and /etc/hosts.deny to make your server more secure.

on the NFS Server, you should put this into the /etc/exports file:

/home slave.domain.com (rw)

this will allow your NFS server to share it's directory /home with the server slave.domain.com, it will also give the share read and write permissions.

Now, to mount this share on the Client, we issue this command:

mount master.domain.com:/home /home

Once you are sure everything is working, you can set up the share to mount automatically at boot by editing /etc/fstab with something like this:

# device mountpoint fs-type options dump fsckorder
...
master.domain.com:/home /home/ nfs rw 0 0
...

please check the man pages for exact syntax for your system (but the above should work)

You may also have to mess around with the uid and gid (sometimes they have to be the same on both servers)

Also dont forget to set up hosts.deny and hosts.allow to properly secure this share. For more information on NFS you can look at the following documentation:

http://nfs.sourceforge.net/nfs-howto/




Dan


All times are GMT -5. The time now is 02:35 PM.