From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: How to make emacs stop trying to load /home/sb/.emacs after su to root? Date: Tue, 9 Jul 2019 21:15:32 +0200 Message-ID: <20190709191532.GE15938@tuxteam.de> 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xA/XKXTdy9G3iaIz" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="195210"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Perry Smith , help-gnu-emacs@gnu.org, Steinar Bang To: Tomas Nordin Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 09 21:17:58 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 1hkvck-000oep-2s for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 21:17:58 +0200 Original-Received: from localhost ([::1]:53258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkvci-0000xn-Sv for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 15:17:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33062) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkvay-0000v8-Um for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 15:16:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkvas-0007qW-NZ for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 15:16:05 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:45966) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkvas-0007nJ-7u for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 15:16:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:Date; bh=1CCvnZRUYP8zwNuncM34zX4JnCJb0qc8tAO/93UOSxk=; b=JYB9NtGyBc8GS0IbYPD0SWmzPB+BGnYhquCxN3xDobJFeDge+sy0e0xMR7ZxlSylc9spCwWrD+ty+GAryRTl11nToMoL+FbZvxuHY23KMvH/vRKMDeptqHga3GmoOfw6dBWefWEz3Zjqp94lRPb9bhrLFnYLu1ZV3kxJczYa5PPTZ1HDtGV8l9tUcfJk7ZEzKLRUM4l5nVTuxgOE6zzVRzGmMMg7btBZu/JeauDuczNCYW5/X5E3XNRoZ8FUrM/5pklU4Kd1orjNo29J85S6ts4KDRWArBMp7/rnEoyIqvvhluIx7fSrV8Skjt+3Oap8U1q5ZlwyV6/pg/ZQBe5xkA==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1hkvaO-0006N0-28; Tue, 09 Jul 2019 21:15:32 +0200 Content-Disposition: inline In-Reply-To: <8736jf2fus.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 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:121130 Archived-At: --xA/XKXTdy9G3iaIz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=9C= su - root=E2=80=9D is the suggested method. > > The =E2=80=98-=E2=80=98 causes the users environment to get loaded or s= omething. 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 :-) Cheers -- t --xA/XKXTdy9G3iaIz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl0k59QACgkQBcgs9XrR2kb45ACfQZVHgBZupuDdwB+G5btAWVu3 0DgAnRNTfY86fla7vhSccDxQfJaS7I8n =Evkk -----END PGP SIGNATURE----- --xA/XKXTdy9G3iaIz--