Agreed, more info needed about what this is for. Is it a web system ?. is it some UI ? is it somthing that will give destructive power?. Risk asseement is needed then you can devise a method for the ammount of security you need.
In general passwords are weak protection, but also one of the most basic forms of protection. there are many articles on the web about risk assesment and password sucurity/policies.that i am not gonna go into in the scope of this post. see
SecurityFocus
Besides that. I would look into cpan
Crypt, and the perl
crypt implentations. Most password systems story only the crypted version of the password and compare the user input crypted and matched against the stored crypted string. This way the file has no plain password, unfortuanatly the standard DES encryption is verry week and can be brute forced quite fast.
If this is a web system on apache there are many ways to authenticate users.
Apache Docs other than that make the file 0400 only by the user that runs the script. and make sure that its not acessable via the web or some other remote connections.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.