Changing the Location of a user's Home/Library Directories

Posted:
in Genius Bar edited January 2014
Is it safe to put a user's Library on a different volume, then create an alias to it, name it "Library" and put it in the user's home folder?



And for that matter, is it safe to change the location of a user's entire home directory via NetInfo Manager? And if you were to put it onto another volume, how would you do so? (/Volumes/VolumeName/DirectoryName?)

Comments

  • Reply 1 of 10
    spartspart Posts: 2,060member
    *bump*
  • Reply 2 of 10
    dobbydobby Posts: 797member
    Quote:

    Originally posted by Spart

    Is it safe to put a user's Library on a different volume, then create an alias to it, name it "Library" and put it in the user's home folder?



    And for that matter, is it safe to change the location of a user's entire home directory via NetInfo Manager? And if you were to put it onto another volume, how would you do so? (/Volumes/VolumeName/DirectoryName?)






    I do this for my users when I move them to a network drive by tar'ring up the home dir (/Users/fred) then untar'ring the dir in the new location.

    You need to change the location in netinfo and to do that use wither nicl or the gui /applications/utils/netinfomanager.



    Try this on a test user first.

    You could also try creating a softlink to the new dir as well which would mean you don't need to modify netinfo.



    Cheers,



    Dobby.
  • Reply 3 of 10
    chuckerchucker Posts: 5,089member
    I did the following half a year ago:



    1. go to single-user mode (so no app intervenes)



    2. use the netinfo CLI utility to change my user's home directory from /Users/Chucker to /Volumes/davidson/HomeChucker/



    3. mv all the stuff



    I restarted and most apps worked - Chimera, surprisingly, did not. But that was solved easily:



    4. create a symlink from /Users/Chucker to /Volumes/davidson/HomeChucker/



    - there, done. Every app works fine with this
  • Reply 4 of 10
    dobbydobby Posts: 797member
    Sorry forgot to add -



    You might want to grep through a defaults read in case anything here needs to be re-defined.



    Dobby.
  • Reply 5 of 10
    spartspart Posts: 2,060member
    Thanks! Moving my home directory now...
  • Reply 6 of 10
    spartspart Posts: 2,060member
    Okay, one problem:



    I am using the root level of a volume for my home directory (stupid, I know) and it's really easy to rename the directory...which is for obvious reasons, bad.



    My old home directory can only be renamed with a root password or whilst logged in as the root user (lecture all you want, Brad, but GUI rocks ) even though it is not the home directory any longer. I own the directory and I have full privileges on it, yet it cannot be renamed. How can I do this with a volume?
  • Reply 7 of 10
    Try opening Terminal and enter this:



    sudo__mv__PathOfFolder__WhatYouWantItToBeRenamedAs (IncludingPath)



    (I put underscores inbetween only to differentiate parts of the command; replace the underscores with 1 space--only 1 space inbetween each section)



    Example:



    To rename the home directory of a user named "Admin" to "Administrator", the command would look like this:



    sudo mv /Users/Admin /Users/Administrator





    I'd recommend that you include the path for both or you might accidentally move it to a different directory. If you don't know the path of the folder you want to rename, drag it into the Terminal window and it'll automatically fill it in.



    Also, you'll need to enter the administrator's password after entering that command, though, since you have the root account enabled, you might need to use the password that you have setup for that.



    I can't say that I've tried renaming a home directory before, so I'm not sure if it'll actually work (if thats what your trying to do). If anything will allow you to rename it, this command should.



    Hope this helps =)
  • Reply 8 of 10
    spartspart Posts: 2,060member
    Actually, quite the opposite. I want to make a volume un-renamable yet still have full read/write/execute privledges on it for my user.
  • Reply 9 of 10
    thuh freakthuh freak Posts: 2,664member
    not sure if this'll work, but try changing the perms on the volume to have the volume owned by the guy who uses it as a home dir (sudo chown userName /Volumes/VolumeName;changing userName and VolumeName appropriately). then make the permissions wrx-rx-rx (read, write execute for the owner, read execute for group and eveyone else; chmod 755 /Volumes/VolumeName). then, in theory, only you should have access to write (as in changing the volname). you may have to put that in a late running startup script, cuz i think volumes get 777 when they are mounted.
  • Reply 10 of 10
    spartspart Posts: 2,060member
    Not quite what I want. I want full rwx perms for my user. No one else uses my computer, so other users aren't a problem. What I need is for me to own it and be able to write in it, but not be able to change the name of it. This is the way it is if you create a new user with a home directory.



    Just it being the home directory doesn't seem to do the trick, and I think it is done seperately as I couldn't rename my old home directory even when it was just a regular folder (and not the current home dir)
Sign In or Register to comment.