On Fri, Dec 08, 2000 at 01:46:44PM -0600, Jonathan Wilson wrote:
> Howdy,
> At my company we try to use "real good" passwords - special characters,
mixed case... etc...
> we use things like proftpd's genuser.pl and Apache's htpasswd scripts
to do the hashing. However special characters such as !@#$%/\'"
get messed up somehow. I'm sure it's possible to use them.
> Does anyone have an idea how to crypt passwords with special characters
without the shell messing things up?
Don't forget whitespace (spaces and tabs).
I'm not real sure exactly what you are trying to do but, in
general, when you want to prevent a shell from interpreting shell
metacharacters (the ones you listed all are) then you can either
escape them by preceeding the individual character with a backslash '\'
or enclose the entire string in SINGLE quotes.
These are all equivalent:
'H$B'
H\$B
'He\\o'
He\\\\o
'# This is one long string and not a comment!'
\#\ This\ is\ one\ long\ string\ and\ not\ a\ comment\!
Special cases, quotes need to be escape (kind of tough to encapsulate
single quotes in single quotes.
> Thanks,
> JW
Mike
--
Michael H. Warfield | (770) 985-6132 | [EMAIL PROTECTED]
(The Mad Wizard) | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list