problem moving a user's home directory to new location

Smoot Carl-Mitchell smoot at tic.com
Sun Jun 22 15:05:48 UTC 2008


On Sun, 2008-06-22 at 07:01 -0500, Jay Ridgley wrote:
> Folks,
> 
> I am attempting to move a user's home directory from /home to /home2.
> I copied all files (?) from /home/user to /home2/user.
> Changed /etc/passwd for user to point to /home2/user. 
> 
> I tested the setup by opening a terminal and doing an su user & was
> prompted for the password for user and logged on, no problems. The pwd
> command did indeed show the correct new directory (/home2/user)
> 
> Rebooted my system and logged in as user with the GUI, All ok except I
> was still pointing to /home/user NOT /home2/user!
> 
> What did I do wrong???? 

Nothing that I can determine, but check if $HOME is set to /home2/user.
If it is not, then somewhere the environment variable got set explicitly
in a startup script (e.g. .bashrc, /etc/bashrc, /etc/profile).  Also
recheck the home directory field in /etc/passwd.
-- 
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list