From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.help Subject: Re: How to make emacs stop trying to load /home/sb/.emacs after su to root? Date: Mon, 8 Jul 2019 19:40:09 -0500 Message-ID: <48B6632F-49C3-4C40-A559-D839FEE11061@easesoftware.com> References: <864l3w18ae.fsf@dod.no> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) 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="214366"; mail-complaints-to="usenet@blaine.gmane.org" Cc: help-gnu-emacs@gnu.org To: Steinar Bang Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 09 02:40:52 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 1hkeBg-000tdl-Jr for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 02:40:52 +0200 Original-Received: from localhost ([::1]:45854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkeBe-0001EG-SD for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Jul 2019 20:40:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50132) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkeBB-0001Bg-Lv for help-gnu-emacs@gnu.org; Mon, 08 Jul 2019 20:40:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkeBA-0000to-Lf for help-gnu-emacs@gnu.org; Mon, 08 Jul 2019 20:40:21 -0400 Original-Received: from aye.elm.relay.mailchannels.net ([23.83.212.6]:34767) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hkeB9-0000pT-Ee for help-gnu-emacs@gnu.org; Mon, 08 Jul 2019 20:40:20 -0400 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9384A5017E0; Tue, 9 Jul 2019 00:40:17 +0000 (UTC) Original-Received: from mi3-ss4.a2hosting.com (100-96-14-11.trex.outbound.svc.cluster.local [100.96.14.11]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 8C32B5019D1; Tue, 9 Jul 2019 00:40:16 +0000 (UTC) X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-Received: from mi3-ss4.a2hosting.com ([TEMPUNAVAIL]. [68.66.200.199]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.3); Tue, 09 Jul 2019 00:40:17 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Battle-Quick: 0fcb921f55a43f31_1562632817233_1522915973 X-MC-Loop-Signature: 1562632817233:2680658234 X-MC-Ingress-Time: 1562632817233 Original-Received: from [162.251.11.6] (port=58915 helo=[192.168.1.121]) by mi3-ss4.a2hosting.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hkeB0-003Brf-JC; Mon, 08 Jul 2019 20:40:10 -0400 In-Reply-To: <864l3w18ae.fsf@dod.no> X-Mailer: Apple Mail (2.3445.104.8) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 23.83.212.6 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:121122 Archived-At: > On Jul 8, 2019, at 5:16 PM, Steinar Bang wrote: >=20 > debian 10.0 "buster", amd64 > emacs 26.1 >=20 > I do /bin/su to change the user to root. > HOME is set to /root >=20 > However emacs still tries to load /home/sb/.emacs >=20 > 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. I suspect one of your uid=E2=80=99s is not root=E2=80=A6 euid, ruid, = etc. and emacs is doing some type of get user attributes and its returning the real user=E2=80=99s= home rather than the effective user=E2=80=99s home.