GNU bug report logs -
#19477
24.4; Init script from su terminal
Previous Next
Full log
Message #8 received at 19477 <at> debbugs.gnu.org (full text, mbox):
Álvar Ibeas wrote:
> ``if you run Emacs from a shell started by `su', Emacs tries to find
> your own `.emacs', not that of the user you are currently pretending
> to be [...] It gets your user name from the environment variables
> `LOGNAME' and `USER'.''
>
> The variables LOGNAME and USER have both the value `root'. The command
> `logname' returns instead my own user name.
Emacs is behaving as documented.
The `su' programs from coreutils (it's since been removed in favour of
the util-linux one) and util-linux (as used by eg Red Hat) do not change
LOGNAME or USER when su'ing to root.
It seems that Debian's `su' comes from the `shadow' package and does
change them.
But all the `su' programs are behaving as documented too.
It's a shame they don't agree with each other...
This bug report was last modified 126 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.