Page 1 of 1

Redirecting /home for each user

Posted: Sat Feb 23, 2013 2:31 pm
by rdagijones
I am setting up Amahi for a client. I noticed that among the Amahi shares that come up there is a user share. (For example, if a create a user called "Bob" there is a Bob directory among the shares.) This folder links to the home folder of that user in Fedora (or in Ubuntu I would assume.)

Here is the problem: If one installs the OS and Amahi on a primary hard drive and then one uses a larger separate storage drive for shares, user shares will fill up space quickly on the OS drive.

Possible solution?: Create a share called "Users" at /var/hda/files/Users. Within that share, create a share for the specified user (e.g. Bob). Create a link that mounts the /home/Bob directory at /var/hda/files/Users/Bob location.

Questions:
-How do I do the link above? (I think I could do it but it would be great to hear from someone else just in case I forgot a step.)
-Can Amahi be adapted to offer this option? (For example: adding "Location of Home Share" under each users information and settings on the Amahi Dashboard under "Users")
-Is there a script that could be created in the meantime that could simplify this process?

Re: Redirecting /home for each user

Posted: Sat Feb 23, 2013 7:48 pm
by bigfoot65
There are several ways to handle this one. New users are linux users and that is why there is a directory for each in /home.

What you could do is make a share for each user and you indicated, then copy all contents of the /home/user folder to it. One complete, remove the /home/user folder and replace it with a symbolic link to the new location.

You could also change the location of the home folder using the linux command:

Code: Select all

usermod
http://linux.about.com/od/commands/l/bl ... sermod.htm

You could create a script to move a group of folders, but having it do it automatically would be a bit more complicated. For Amahi to do it by default, it would need to be coded in the platform. This would be a feature request that we can consider for Amahi 7. Recommend you file a feature request in the bug tracker at http://bugs.amahi.org.

This is a good idea and is doable. Something hopefully we can get into the initial release of Amahi 7.