GNU bug report logs -
#24231
25.1.1: sudo displays password
Previous Next
Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Date: Mon, 15 Aug 2016 09:22:02 UTC
Severity: normal
Tags: notabug
Found in version 25.1.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24231 in the body.
You can then email your comments to 24231 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24231
; Package
emacs
.
(Mon, 15 Aug 2016 09:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas Röhler <andreas.roehler <at> easy-emacs.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 15 Aug 2016 09:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
emacs -Q
M-shell RET
sudo displays password at Xubuntu
GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7) of
2016-08-01
Linux [...] 4.2.0-42-generic #49-Ubuntu SMP Tue Jun 28 21:26:26 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24231
; Package
emacs
.
(Mon, 15 Aug 2016 10:54:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 24231 <at> debbugs.gnu.org (full text, mbox):
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
Hi Andreas,
> emacs -Q
>
> M-shell RET
>
> sudo displays password at Xubuntu
>
> GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7) of
> 2016-08-01
It doesn't for me, using
GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.30)
of 2016-08-15
Could you pls show exactly the prompt, sudo is printing in the shell
buffer? For me, it is
detlef:~/src/tramp> sudo -i
[sudo] password for albinus:
root <at> detlef:~#
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24231
; Package
emacs
.
(Mon, 15 Aug 2016 12:16:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 24231 <at> debbugs.gnu.org (full text, mbox):
Screenshot and complete output of M-x report-emacs-bug RET sent off-list.
On 15.08.2016 12:53, Michael Albinus wrote:
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>
> Hi Andreas,
>
>> emacs -Q
>>
>> M-shell RET
>>
>> sudo displays password at Xubuntu
>>
>> GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7) of
>> 2016-08-01
> It doesn't for me, using
>
> GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.30)
> of 2016-08-15
>
> Could you pls show exactly the prompt, sudo is printing in the shell
> buffer? For me, it is
>
> detlef:~/src/tramp> sudo -i
> [sudo] password for albinus:
> root <at> detlef:~#
>
> Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24231
; Package
emacs
.
(Mon, 15 Aug 2016 14:23:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 24231 <at> debbugs.gnu.org (full text, mbox):
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
Hi Andreas,
> Screenshot and complete output of M-x report-emacs-bug RET sent off-list.
Arrived :-)
Your problem is your German locale. The screenshot shows the following
password prompt:
[sudo] Passwort für user: xyz-and-blah
And you have the locale setting LANGUAGE=de_DE. The word "Passwort" is
not a problem, it is part of password-word-equivalents. But the German
word "für" does not match comint-password-prompt-regexp, you'll see (at
the end of this regexp) that it only accepts the non-localized "for".
You can test yourself in the shell buffer, for example with one of
detlef:~> env LANGUAGE=en_US sudo -i
detlef:~> env SUDO_PROMPT="password: " sudo -i
detlef:~> sudo -p "password: " -i
All shall work as expected. Maybe one could try to add the localized
version of "for" in comint-password-prompt-regexp, but I have no idea
how to extract this from the system wide password prompt without trying
sudo.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24231
; Package
emacs
.
(Mon, 15 Aug 2016 15:38:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 24231 <at> debbugs.gnu.org (full text, mbox):
On 15.08.2016 16:22, Michael Albinus wrote:
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>
> Hi Andreas,
>
>> Screenshot and complete output of M-x report-emacs-bug RET sent off-list.
> Arrived :-)
>
> Your problem is your German locale. The screenshot shows the following
> password prompt:
>
> [sudo] Passwort für user: xyz-and-blah
>
> And you have the locale setting LANGUAGE=de_DE. The word "Passwort" is
> not a problem, it is part of password-word-equivalents. But the German
> word "für" does not match comint-password-prompt-regexp, you'll see (at
> the end of this regexp) that it only accepts the non-localized "for".
>
> You can test yourself in the shell buffer, for example with one of
>
> detlef:~> env LANGUAGE=en_US sudo -i
>
> detlef:~> env SUDO_PROMPT="password: " sudo -i
>
> detlef:~> sudo -p "password: " -i
>
> All shall work as expected. Maybe one could try to add the localized
> version of "for" in comint-password-prompt-regexp, but I have no idea
> how to extract this from the system wide password prompt without trying
> sudo.
>
> Best regards, Michael.
Thanks!
Should it not be possible to suppress the plain echo in all cases
following "sudo"?
As the QT-shell does IIUC.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24231
; Package
emacs
.
(Mon, 15 Aug 2016 15:53:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 24231 <at> debbugs.gnu.org (full text, mbox):
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
Hi Andreas,
> Should it not be possible to suppress the plain echo in all cases
> following "sudo"?
> As the QT-shell does IIUC.
That's not Emacs' job. As shown by my examples, you might be able to
configure the sudo password prompt yourself. A simple
(setenv "SUDO_PROMPT" "password: ")
in your .emacs would suffice.
Best regards, Michael.
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Wed, 17 Aug 2016 07:43:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Andreas Röhler <andreas.roehler <at> easy-emacs.de>
:
bug acknowledged by developer.
(Wed, 17 Aug 2016 07:43:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 24231-done <at> debbugs.gnu.org (full text, mbox):
Michael Albinus <michael.albinus <at> gmx.de> writes:
Hi Andreas,
>
>> Should it not be possible to suppress the plain echo in all cases
>> following "sudo"?
>> As the QT-shell does IIUC.
>
> That's not Emacs' job. As shown by my examples, you might be able to
> configure the sudo password prompt yourself. A simple
>
> (setenv "SUDO_PROMPT" "password: ")
>
> in your .emacs would suffice.
I'm closing the bug, because it is not an Emacs error.
Best regards, Michael.
Added tag(s) notabug.
Request was from
Michael Albinus <michael.albinus <at> gmx.de>
to
control <at> debbugs.gnu.org
.
(Wed, 17 Aug 2016 07:44:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24231
; Package
emacs
.
(Wed, 17 Aug 2016 08:44:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 24231-done <at> debbugs.gnu.org (full text, mbox):
reopen 24231
Hallo Michael,
sorry continuing so late.
Checked with eshell, which hides the password, displaying just spots.
From there think it would be worth fixing it at Emacs-shell.
Looks like a solution is in esh-mode.el:
(defun eshell-send-invisible ()
"Read a string without echoing.
Best,
Andreas
On 17.08.2016 09:42, Michael Albinus wrote:
> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
> Hi Andreas,
>>> Should it not be possible to suppress the plain echo in all cases
>>> following "sudo"?
>>> As the QT-shell does IIUC.
>> That's not Emacs' job. As shown by my examples, you might be able to
>> configure the sudo password prompt yourself. A simple
>>
>> (setenv "SUDO_PROMPT" "password: ")
>>
>> in your .emacs would suffice.
> I'm closing the bug, because it is not an Emacs error.
>
> Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24231
; Package
emacs
.
(Wed, 17 Aug 2016 09:19:01 GMT)
Full text and
rfc822 format available.
Message #33 received at 24231 <at> debbugs.gnu.org (full text, mbox):
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
> Hallo Michael,
Hi Andreas,
> sorry continuing so late.
>
> Checked with eshell, which hides the password, displaying just spots.
Eshell uses `eshell-password-prompt-regexp' for password watching, while
shell-mode uses `comint-password-prompt-regexp'.
> From there think it would be worth fixing it at Emacs-shell.
I don't know whether it is applicable to use the more simple
`eshell-password-prompt-regexp' in shell-mode. I guess there is a reason
to use `comint-password-prompt-regexp' there.
Why do you oppose to the solution I've proposed, setting "SUDO_PROMPT"
in your .emacs?
> Best,
>
> Andreas
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24231
; Package
emacs
.
(Wed, 17 Aug 2016 10:02:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 24231 <at> debbugs.gnu.org (full text, mbox):
On 17.08.2016 11:18, Michael Albinus wrote:
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>
>> Hallo Michael,
> Hi Andreas,
>
>> sorry continuing so late.
>>
>> Checked with eshell, which hides the password, displaying just spots.
> Eshell uses `eshell-password-prompt-regexp' for password watching, while
> shell-mode uses `comint-password-prompt-regexp'.
>
>> From there think it would be worth fixing it at Emacs-shell.
> I don't know whether it is applicable to use the more simple
> `eshell-password-prompt-regexp' in shell-mode. I guess there is a reason
> to use `comint-password-prompt-regexp' there.
>
> Why do you oppose to the solution I've proposed, setting "SUDO_PROMPT"
> in your .emacs?
Being not opposed, just think that's not a solution in general.
Emacs should be safe without special configuration.
Anyway, should you close again, I'll not re-open, promised :)
Cheers,
Andreas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24231
; Package
emacs
.
(Wed, 17 Aug 2016 10:09:01 GMT)
Full text and
rfc822 format available.
Message #39 received at 24231 <at> debbugs.gnu.org (full text, mbox):
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
Hi Andreas,
> Anyway, should you close again, I'll not re-open, promised :)
Your re-open didn't work, so I'm still satisfied with the bug status. I
recommend you next time to use debbugs.el for actions on bugs. Then you
can blame *me*, if it doesn't work :-)
> Cheers,
>
> Andreas
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 14 Sep 2016 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 358 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.