Solved Every users home is now /root!

About a week or two ago, I moved /usr/home to a directory on a different disk. Symlink /usr/home to this new directory. Everything seemed fine.

Today, I had to reboot. Now when I login as any user their /home directory is set to /root. The command cd ~ changes to /root for everyone.

I checked /etc/passwd and /etc/master.passwd and everyones home is correct in that file. I even rebuilt the passwd db just to make sure.

I know in the past I have been able to use a different disk for my /usr directory, but doing this a level lower seems to be causing issues.

Any suggestions?

FreeBSD 10.3 Release p7
 
Check if your users are actually using /usr/home/${USER}, also check /home which should be a symlink to /usr/home. Double check the permissions on /usr/home.
 
The permission on /usr/home where 775...I changed them to 777 just to see. Since I was logged in as root I: su roddierod and when I cd ~. I was in the correct /home/roddierod. So I logged out of root...logged in a roddierod and cd ~ gave me /root. So, if I su to an account I get the correct home directory but if I login with that account I get /root
 
Use su -l to test, a plain su doesn't clear the environment.
 
Code:
$ su -l dana
Password:
su: no directory

but regular su works correctly. Now I'm confused. Tripple check all permissions and everything seems correct 755.
 
Please post the output of getent passwd roddierod and ls -ld /home /usr/home (and whatever the new "home" directory is).
 
Code:
$ getent passwd roddierod
roddierod:*:1001:1001:roddie rod:/home/roddierod:/bin/sh
$ ls -ld /home /usr/home
lrwxr-xr-x  1 root  wheel   8 Aug 20  2014 /home -> usr/home
lrwxr-xr-x  1 root  wheel  18 Sep 23 14:08 /usr/home -> /mnt/NEWSTORE/home
$

/mnt/NEWSTORE/home is where location of the new home
 
Ok, those appear to be good. What are the permissions on /mnt/NEWSTORE/home?
 
Code:
$ pwd
/mnt/NEWSTORE
$ls -l
total 32
drwxr-xr-x   2 root       operator   512 Sep 28 06:53 BK-fBSD-10
drwxr-xr-x   7 root       operator   512 Jun 27  2015 CD-RIP
drwxr-xr-x   4 roddierod  operator   512 Sep 20 11:09 FROMSTORE
drwxr-xr-x   2 roddierod  operator   512 Jul 21  2015 Image
drwxr-xr-x   4 root       operator   512 Sep 28 06:46 hives

drwxr-xr-x   9 root       wheel      512 Sep 23 13:12 home

drwxr-xr-x  72 root       wheel     2048 Sep 27 10:57 ports
drwxr-xr-x   5 roddierod  operator   512 Sep 20 11:08 tmp
 
That looks good too. Grasping at straws now but check if /mnt and /mnt/NEWSTORE also have 755 permissions.
 
/mnt was 770...I changed it to 775 now:

Code:
$ su -l dana
Password:
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
                -- Dru <genesis@istar.ca>
$pwd
/mnt/NEWSTORE/home/dana

Thanks!
 
Back
Top