* bug#24231: 25.1.1: sudo displays password
@ 2016-08-15 9:27 Andreas Röhler
2016-08-15 10:53 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Röhler @ 2016-08-15 9:27 UTC (permalink / raw
To: 24231
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#24231: 25.1.1: sudo displays password
2016-08-15 9:27 bug#24231: 25.1.1: sudo displays password Andreas Röhler
@ 2016-08-15 10:53 ` Michael Albinus
2016-08-15 12:20 ` Andreas Röhler
0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2016-08-15 10:53 UTC (permalink / raw
To: Andreas Röhler; +Cc: 24231
Andreas Röhler <andreas.roehler@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@detlef:~#
Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#24231: 25.1.1: sudo displays password
2016-08-15 10:53 ` Michael Albinus
@ 2016-08-15 12:20 ` Andreas Röhler
2016-08-15 14:22 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Röhler @ 2016-08-15 12:20 UTC (permalink / raw
To: 24231
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@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@detlef:~#
>
> Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#24231: 25.1.1: sudo displays password
2016-08-15 12:20 ` Andreas Röhler
@ 2016-08-15 14:22 ` Michael Albinus
2016-08-15 15:43 ` Andreas Röhler
0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2016-08-15 14:22 UTC (permalink / raw
To: Andreas Röhler; +Cc: 24231
Andreas Röhler <andreas.roehler@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#24231: 25.1.1: sudo displays password
2016-08-15 14:22 ` Michael Albinus
@ 2016-08-15 15:43 ` Andreas Röhler
2016-08-15 15:52 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Röhler @ 2016-08-15 15:43 UTC (permalink / raw
To: Michael Albinus; +Cc: 24231
On 15.08.2016 16:22, Michael Albinus wrote:
> Andreas Röhler <andreas.roehler@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#24231: 25.1.1: sudo displays password
2016-08-15 15:43 ` Andreas Röhler
@ 2016-08-15 15:52 ` Michael Albinus
2016-08-17 7:42 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2016-08-15 15:52 UTC (permalink / raw
To: Andreas Röhler; +Cc: 24231
Andreas Röhler <andreas.roehler@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#24231: 25.1.1: sudo displays password
2016-08-15 15:52 ` Michael Albinus
@ 2016-08-17 7:42 ` Michael Albinus
2016-08-17 8:48 ` Andreas Röhler
0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2016-08-17 7:42 UTC (permalink / raw
To: Andreas Röhler; +Cc: 24231-done
Michael Albinus <michael.albinus@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#24231: 25.1.1: sudo displays password
2016-08-17 7:42 ` Michael Albinus
@ 2016-08-17 8:48 ` Andreas Röhler
2016-08-17 9:18 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Röhler @ 2016-08-17 8:48 UTC (permalink / raw
To: Michael Albinus; +Cc: 24231-done
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@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#24231: 25.1.1: sudo displays password
2016-08-17 8:48 ` Andreas Röhler
@ 2016-08-17 9:18 ` Michael Albinus
2016-08-17 10:07 ` Andreas Röhler
0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2016-08-17 9:18 UTC (permalink / raw
To: Andreas Röhler; +Cc: 24231
Andreas Röhler <andreas.roehler@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#24231: 25.1.1: sudo displays password
2016-08-17 9:18 ` Michael Albinus
@ 2016-08-17 10:07 ` Andreas Röhler
2016-08-17 10:08 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Röhler @ 2016-08-17 10:07 UTC (permalink / raw
To: Michael Albinus; +Cc: 24231
On 17.08.2016 11:18, Michael Albinus wrote:
> Andreas Röhler <andreas.roehler@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
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#24231: 25.1.1: sudo displays password
2016-08-17 10:07 ` Andreas Röhler
@ 2016-08-17 10:08 ` Michael Albinus
0 siblings, 0 replies; 11+ messages in thread
From: Michael Albinus @ 2016-08-17 10:08 UTC (permalink / raw
To: Andreas Röhler; +Cc: 24231
Andreas Röhler <andreas.roehler@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-08-17 10:08 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-15 9:27 bug#24231: 25.1.1: sudo displays password Andreas Röhler
2016-08-15 10:53 ` Michael Albinus
2016-08-15 12:20 ` Andreas Röhler
2016-08-15 14:22 ` Michael Albinus
2016-08-15 15:43 ` Andreas Röhler
2016-08-15 15:52 ` Michael Albinus
2016-08-17 7:42 ` Michael Albinus
2016-08-17 8:48 ` Andreas Röhler
2016-08-17 9:18 ` Michael Albinus
2016-08-17 10:07 ` Andreas Röhler
2016-08-17 10:08 ` Michael Albinus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.