home directory overridden by root?

Tijl Coosemans tijl at FreeBSD.org
Mon Feb 27 10:14:26 UTC 2017

On Sun, 26 Feb 2017 15:22:23 -0800 Paul Beard <paulbeard at gmail.com> wrote:
> For some reason my home directory reverts to/is confused with /root. I
> login, get dropped at home, but cd will take me to /root and any
> command I run assumes I am in root’s (non-writable) home. How can I
> fix that? I can’t quite make out what’s wrong.
> FreeBSD www 10.3-STABLE FreeBSD 10.3-STABLE #0 r312644: Sun Jan 22
> 11:36:16 PST 2017     root at www:/usr/obj/usr/src/sys/SHUTTLE  i386
> ssh www
> [successful login]
> [paul at www /home/paul]$ whoami
> paul
> [paul at www /home/paul]$ id
> uid=1001(paul) gid=1001(paul) groups=1001(paul),0(wheel)
> [paul at www /home/paul]$ cd 
> [paul at www ~]$ pwd
> /root
> [paul at www ~]$ sudo grep paul /etc/master.passwd 
> Password:
> paul:[redacted]:1001:1001::0:0:paul:/home/paul:/usr/local/bin/bash
> [paul at www ~]$ 

echo $HOME

If that's not correct check if some login script sets that variable
and remove that.  Its value should be correct by default.

More information about the freebsd-questions mailing list