unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Perry Smith <pedz@easesoftware.com>
To: Steinar Bang <sb@dod.no>
Cc: help-gnu-emacs@gnu.org
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	[thread overview]
Message-ID: <48B6632F-49C3-4C40-A559-D839FEE11061@easesoftware.com> (raw)
In-Reply-To: <864l3w18ae.fsf@dod.no>


> On Jul 8, 2019, at 5:16 PM, Steinar Bang <sb@dod.no> wrote:
> 
> debian 10.0 "buster", amd64
> emacs 26.1
> 
> I do /bin/su to change the user to root.
> HOME is set to /root
> 
> However emacs still tries to load /home/sb/.emacs
> 
> How can I make emacs stop loading the original user's .emacs when logged
> in as root?

Can you do “id” after you do the su?  Usually “su - root” is the suggested method.
The ‘-‘ causes the users environment to get loaded or something.  Never looked
too deep into it.

I suspect one of your uid’s is not root… euid, ruid, etc. and emacs is doing
some type of get user attributes and its returning the real user’s home rather
than the effective user’s home.





  parent reply	other threads:[~2019-07-09  0:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 22:16 How to make emacs stop trying to load /home/sb/.emacs after su to root? Steinar Bang
2019-07-08 23:20 ` Stefan Monnier
2019-07-11 17:59   ` Steinar Bang
2019-07-11 18:09     ` Steinar Bang
2019-07-11 18:24       ` Steinar Bang
2019-07-11 18:41         ` Steinar Bang
2019-07-11 19:03           ` Steinar Bang
2019-07-12  2:56       ` Perry Smith
2019-07-12 16:11         ` Steinar Bang
2019-07-12 16:33           ` Stefan Monnier
2019-07-12 21:41             ` Steinar Bang
2019-07-13  5:30               ` Steinar Bang
2019-07-13 15:04               ` Perry Smith
2019-07-13 18:04                 ` Steinar Bang
2019-07-09  0:40 ` Perry Smith [this message]
2019-07-09 19:00   ` Tomas Nordin
2019-07-09 19:15     ` tomas
2019-07-09 20:04       ` Tomas Nordin
2019-07-09 20:20         ` tomas
2019-07-10 14:42           ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48B6632F-49C3-4C40-A559-D839FEE11061@easesoftware.com \
    --to=pedz@easesoftware.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=sb@dod.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).