GNU bug report logs - #46466
28.0.50; Tramp hangs with bad prompt even when using /bin/sh

Previous Next

Package: emacs;

Reported by: Erik Hetzner <egh <at> e6h.org>

Date: Fri, 12 Feb 2021 18:16:01 UTC

Severity: wishlist

Tags: notabug

Found in version 28.0.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 46466 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Erik Hetzner <egh <at> e6h.org>
Cc: 46466 <at> debbugs.gnu.org
Subject: Re: bug#46466: 28.0.50; Tramp hangs with bad prompt even when using
 /bin/sh
Date: Sat, 13 Feb 2021 09:53:35 +0100
Erik Hetzner <egh <at> e6h.org> writes:

> Hello,

Hi Erik,

> 1. Create a new user: `adduser test`
> 2. `sudo su test` and ensure that home directory is completely empty
> 3. `echo PS1=badprompt > .bash_profile
> 4. Switch back to main user
> 5. Start emacs with emacs -q
> 6. C-x C-f /ssh:test <at> localhost:
>
> Expected result: dired for test user home dir.
>
> Actual result: tramp hangs.
>
> This kind of issue is well documented on the internet (stackexchange,
> etc.) but I haven't seen a bug for it.
>
> As I understand it, because `tramp-default-remote-shell' is set to
> /bin/sh, tramp should ignore `.bash_profile`. When I look at running
> shells, all I see is /bin/sh, so it's not clear to me where/why/how
> /bin/bash is being invoked.

What is /bin/sh, both locally and remote? In my case, running Fedora 33,
I see

--8<---------------cut here---------------start------------->8---
# ls -l /bin/sh
lrwxrwxrwx. 1 root root 4 Jul 27  2020 /bin/sh -> bash
--8<---------------cut here---------------end--------------->8---

> Thank you!
>
> best, Erik Hetzner

Best regards, Michael.




This bug report was last modified 3 years and 333 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.