From owner-freebsd-questions@freebsd.org Mon Feb 27 11:54:05 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28BA8CEFD1C for ; Mon, 27 Feb 2017 11:54:05 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay10.qsc.de (mailrelay10.qsc.de [212.99.163.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92794A49 for ; Mon, 27 Feb 2017 11:54:04 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay10.qsc.de; Mon, 27 Feb 2017 12:53:03 +0100 Received: from r56.edvax.de (port-92-195-29-65.dynamic.qsc.de [92.195.29.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 3265E3CC71; Mon, 27 Feb 2017 12:53:01 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v1RBr06D001926; Mon, 27 Feb 2017 12:53:01 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Mon, 27 Feb 2017 12:53:00 +0100 From: Polytropon To: Paul Beard Cc: freebsd-questions@freebsd.org Subject: Re: home directory overridden by root? Message-Id: <20170227125300.e6a692b8.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay10.qsc.de with 5711C683456 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.1852 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Feb 2017 11:54:05 -0000 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, ...