unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 11194@debbugs.gnu.org
Subject: bug#11194: 24.0.95; sudo rm doesn't work with absolute directory paths on the file system
Date: Fri, 20 Apr 2012 22:58:52 +0200	[thread overview]
Message-ID: <87wr5ai0hf.fsf@gmail.com> (raw)
In-Reply-To: <877gxaseud.fsf@gmx.de> (Michael Albinus's message of "Fri, 20 Apr 2012 15:38:34 +0200")

Hi Michael,

Michael Albinus <michael.albinus@gmx.de> writes:

> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>
>>> Hi Michael,
>
> Hi Thierry,
>
>>> Michael Albinus <michael.albinus@gmx.de> writes:
>>>
>>>> And, btw, people who don't like the current behaviour are free to add
>>>>
>>>> alias sudo *sudo $*
>>> Most people use such an alias because eshell/sudo is not working with
>>> commands where files are not involved 
>>> e.g "eshell/sudo uname -a" or "eshell/sudo fdisk -l" etc...
>>>
>>> ==> ssh: connect to host localhost port 22: Connection refused
This happen with a bad configuration of `tramp-default-proxies-alist':

--8<---------------cut here---------------start------------->8---
(add-to-list 'tramp-default-proxies-alist
             '(nil "\\`root\\'" "/ssh:%h:"))
--8<---------------cut here---------------end--------------->8---

With this with host set to nil,
(directory-file-p "/sudo:localhost:")
C-x C-f "/sudo:localhost:"
eshell/sudo
fail with error above.
The host should be set to the real name of the host we want to connect
on as root:

--8<---------------cut here---------------start------------->8---
(add-to-list 'tramp-default-proxies-alist
             '("\\`realhostname\\'" "\\`root\\'" "/ssh:%h:"))
--8<---------------cut here---------------end--------------->8---

>> And also it is using /bin/sh which is not aware of many system
>> maintenance commands mostly used as root with sudo.
>
> Does there exist a corresponding bug report? I'm short in time, but
> maybe I could have a look on it later.
No but you can reproduce easily with:

$ eshell/sudo fdisk -l
=>/bin/sh: fdisk: not found

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





      reply	other threads:[~2012-04-20 20:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-07 10:45 bug#11194: 24.0.95; sudo rm doesn't work with absolute directory paths on the file system Cray Elliott
2012-04-08 11:00 ` Michael Albinus
2012-04-09  2:20   ` Stefan Monnier
2012-04-09 18:08     ` Michael Albinus
2012-04-10  1:58       ` Stefan Monnier
2012-04-10  7:07         ` Michael Albinus
2012-04-10 13:01           ` Stefan Monnier
2012-04-10 14:00             ` Michael Albinus
2012-04-10 14:55               ` Stefan Monnier
2012-04-10 15:14                 ` Michael Albinus
2012-04-10 16:23                   ` Stefan Monnier
2012-04-10 16:41                     ` Thierry Volpiatto
2012-04-10 17:07                       ` Thierry Volpiatto
2012-04-10 18:00                       ` Stefan Monnier
2012-04-20 13:35                     ` Michael Albinus
2012-04-21  2:03                       ` Stefan Monnier
2012-04-22 17:47                         ` Michael Albinus
2012-04-24  1:52                           ` Stefan Monnier
2012-04-25  9:32                             ` Michael Albinus
2012-04-10 16:35                   ` Thierry Volpiatto
2012-04-10 16:57                     ` Thierry Volpiatto
2012-04-20 13:38                       ` Michael Albinus
2012-04-20 20:58                         ` Thierry Volpiatto [this message]

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=87wr5ai0hf.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=11194@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).