From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: sql-mode password display
Date: Wed, 02 Mar 2005 11:31:50 -0700 [thread overview]
Message-ID: <38mf4qF5q3gudU1@individual.net> (raw)
In-Reply-To: <kx9vf8a9e9x.fsf@panix5.panix.com>
rb wrote:
> When I use sql mode:
>
> M-x sql-mysql, then follow prompts,
>
> I get the interactive sql buffer which works very well for me. The only
> problem is that when I list the processes, the mysql process shows my
> password, and I would like to know if there is something I can do to
> conceal it?
>
> rb@antonio 102% ps -ef | grep sql
> rb 29562 29372 0 08:44:27 pts/4 0:00 grep sql
> rb 29717 15897 0 08:43:34 pts/8 0:00
> /usr/freeware/bin/mysql --user=rb --password=my_password
> --host=sanmarco test
What happens if you don't enter your password when prompted by M-x
sql-mysql, i.e. just type RET?
> I was trying to find wheter there was a customizable variable to
> conceal/display password and with M-x customize-apropos, I discovered
> that the password was displayed in the customization buffer as well:
>
> Sql Password: Hide my_password
> State: this option has been changed outside the customize buffer.
> Default password. More
> Parent groups: Sql
,----[ C-h v sql-password RET ]
| sql-password's value is ""
|
| Documentation:
| *Default password.
|
| Storing your password in a textfile such as ~/.emacs could be dangerous.
| Customizing your password will store it in your ~/.emacs file.
|
| You can customize this variable.
|
| Defined in `sql'.
`----
sql-password was changed outside of Customize by sql-get-login. But if
you just respond with RET it will remain "".
> If I start an ineractive mysql session at the command line in an xwsh
> shell, I get the following (password not displayed):
>
> rb@antonio 101% ps -ef | grep sql
> rb 29598 29535 0 08:31:14 pts/6 0:00 mysql -h
> sanmarco -u rb -p test
>
> Also, working in shell-mode within emacs, to process a batch file, my
> password is displayed in the *shell* buffer, and is retained in the
> command history list.
>
> From Emacs shell buffer:
>
> rb@antonio 98% mysql -vv -h sanmarco -u rb -p < dbs.sql > dbs.out0222
> mysql -vv -h sanmarco -u rb -p < dbs.sql > dbs.out0222
> Enter password: my_password
>
> Within the shell, any other commands requiring a password (ssh, rlogin,
> su, etc), the password is properly not displayed.
,----[ C-h v comint-password-prompt-regexp RET ]
| comint-password-prompt-regexp's value is
| "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|Kerberos \\|CVS \\|UNIX \\|
SMB \\|^\\)[Pp]assword\\( (again)\\)?\\|pass
phrase\\|\\(Enter\\|Repeat\\) passphrase\\)\\( for [^:]+\\)?:\\s *\\'"
|
| Documentation:
| *Regexp matching prompts for passwords in the inferior process.
| This is used by `comint-watch-for-password-prompt'.
|
| You can customize this variable.
|
| Defined in `comint'.
`----
M-: (string-match comint-password-prompt-regexp "Enter password: ") RET
returns nil, so I would try
(setq comint-password-prompt-regexp
"\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|Kerberos \\|CVS \\|UNIX
\\| SMB \\|^\\)[Pp]assword\\( (again)\\)?\\|pass
phrase\\|\\(Enter\\|Repeat\\) pass ?\\(word\\|phrase\\)\\)\\( for
[^:]+\\)?:\\s *\\'")
--
Kevin Rodgers
next prev parent reply other threads:[~2005-03-02 18:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-02 16:57 sql-mode password display rb
2005-03-02 18:31 ` Kevin Rodgers [this message]
2005-03-02 20:35 ` rb
2005-03-03 19:42 ` Kevin Rodgers
2005-03-03 20:51 ` Michael Mauger
[not found] ` <mailman.2522.1109885280.32256.help-gnu-emacs@gnu.org>
2005-03-03 23:15 ` rb
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38mf4qF5q3gudU1@individual.net \
--to=ihs_4664@yahoo.com \
/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 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.