From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Nordin Newsgroups: gmane.emacs.help Subject: Re: How to make emacs stop trying to load /home/sb/.emacs after su to root? Date: Tue, 09 Jul 2019 22:04:20 +0200 Message-ID: <87wogr0ybf.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> References: <864l3w18ae.fsf@dod.no> <48B6632F-49C3-4C40-A559-D839FEE11061@easesoftware.com> <8736jf2fus.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> <20190709191532.GE15938@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="130875"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Perry Smith , help-gnu-emacs@gnu.org, Steinar Bang To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 09 22:05:59 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkwNC-000Xp0-GM for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 22:05:59 +0200 Original-Received: from localhost ([::1]:55092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkwNB-0005Ou-5m for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 16:05:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33896) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkwLl-0004nB-Sg for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 16:04:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkwLh-00086n-Pn for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 16:04:27 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:46731) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hkwLh-00082E-57 for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 16:04:25 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id EEAFC160064 for ; Tue, 9 Jul 2019 22:04:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1562702663; bh=+RL4ehStlwFs22QZ+AK2WmzNSEgymHt9tuGHy+/31ao=; h=From:To:Cc:Subject:Date:From; b=bjGTdHIRbezd/w1xje8WX2tJ1AHsejags/0v1gllEJI+GU1ydjaSzcj8jNU/kXEoL r9HA0qL41SNtliTfXloZQNFfSpIUhiKgYeeGfB5ZaKa+VkST7sWfidqbk/q9xTwBwj aTk181xixV7q+DeVA4fngKxhcC29R/25uPqs6iim9spnS2zJ9sL+OMFS2glnuVXlfd a3Na+h9aW6n6871nvpymjapI8jBQ+yepwO1b0NPuMa42pGqXywTnJHuC0ObjS4fC7s px0kvnd34LymYEe8rpMJHPcNMlf7AOG/CencNmtqzyseJpvaYlzOGZ5IqSBQy35y8e aBX3zjF7SP7Qw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 45jtZD5kzcz6tmB; Tue, 9 Jul 2019 22:04:20 +0200 (CEST) In-Reply-To: <20190709191532.GE15938@tuxteam.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.67.36.65 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121131 Archived-At: tomas@tuxteam.de writes: > On Tue, Jul 09, 2019 at 09:00:11PM +0200, Tomas Nordin wrote: >> Perry Smith writes: > > [...] > >> >> How can I make emacs stop loading the original user's .emacs when >> >> logged in as root? >> > >> > Can you do =E2=80=9Cid=E2=80=9D after you do the su? Usually =E2=80= =9Csu - root=E2=80=9D is the suggested method. >> > The =E2=80=98-=E2=80=98 causes the users environment to get loaded or = something. Never looked >> > too deep into it. >>=20 >> After su; >>=20 >> # id >> uid=3D0(root) gid=3D0(root) groups=3D0(root) >>=20 >> After su - root; >>=20 >> # id >> uid=3D0(root) gid=3D0(root) groups=3D0(root) >>=20 >> but after this latter way of getting root emacs did not try to load >> /home/tomas/.emacs >>=20 >> Just metooing > > Have you checked the environment? What does $HOME say? (although the > "su -" part lets one expect that the HOME var is set anew: checking > won't hurt :-) echo $HOME gave /root after both su methods > > Cheers > -- t