Re: Hashing out tyoed passwords



In <84psc9mr1w.fsf@xxxxxxxxx> Todd H.:

[Snip...]

insecurities inherent in handling the password in envirionment variable

Agreed--another approach for most (all?) versions of bash may be the "Silent
mode" option with the "read" builtin:

BASH_BUILTINS(1)
....

read [-ers] ... [name ...]
One line is read from the standard input, or from the file
descriptor fd supplied as an argument to the -u option, and the
first word is assigned to the first name, the second word to the
second name, and so on, with leftover words and their interven-
ing separators assigned to the last name...
....
-s Silent mode. If input is coming from a terminal, charac-
ters are not echoed.

This of course won't fill the password field with "*"'s but--oh well. And as
you mentioned, it may imply some security bugs as well.

HTH; YMMV...

--
Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
Pardon any bogus email addresses (wookie) in place for spambots.
Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
Kids jumping ship? Looking to hire an old-school type? Email me.
.



Relevant Pages

  • Re: Hashing out tyoed passwords
    ... Agreed--another approach for most versions of bash may be the "Silent ... One line is read from the standard input, ... first word is assigned to the first name, the second word to the ... Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS * ...
    (comp.os.linux.misc)
  • Re: differences in "read" builtin behaviour
    ... giacomo boffi writes: ... > One line is read from the standard input, and the first word is ... > assigned to the first NAME, the second word to the second NAME, ...
    (comp.unix.shell)