Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2017 12:53:00 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Paul Beard <paulbeard@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: home directory overridden by root?
Message-ID:  <20170227125300.e6a692b8.freebsd@edvax.de>
In-Reply-To: <B9C3096B-970E-468D-9316-9E650BAEC448@gmail.com>
References:  <B9C3096B-970E-468D-9316-9E650BAEC448@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 26 Feb 2017 15:22:23 -0800, Paul Beard 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@www:/usr/obj/usr/src/sys/SHUTTLE  i386
> 
> ssh www
> [successful login]
> [paul@www /home/paul]$ whoami
> paul
> [paul@www /home/paul]$ id
> uid=1001(paul) gid=1001(paul) groups=1001(paul),0(wheel)
> [paul@www /home/paul]$ cd 
> [paul@www ~]$ pwd
> /root
> [paul@www ~]$ sudo grep paul /etc/master.passwd 
> Password:
> paul:[redacted]:1001:1001::0:0:paul:/home/paul:/usr/local/bin/bash
> [paul@www ~]$ 

As you have verified /etc/passwd's setting, something else could
have changed $HOME (this is where "cd" leads you to); in your
case, $HOME probably is set to /root for some reason. For example,
check ~/.bash_login, ~/.bash_profile (as I see bash is your login
shell), and ~/.login_conf, basically anything that can change
environmental variables at login time...




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170227125300.e6a692b8.freebsd>