Hi,
A few methods I have used in the past...

1) Make it so you use the /etc/passwd file on a *nix system. This way you already have the file provided. The only issue is you may not want to create accounts for all the users if you are just wanting to provide passworded protection for say a web offered service that uses the database. You would also be able to take advantage of say password shadowing services through system level calls as well, so you didn't have to worry about people stealing and brute forcing your password file as much.

2) Another approach is to have another unprotected database that contains a table with the encrypted passwords for the users in them. That way if you are running more than one application you can have a separate table for each. This would also mean that the person on the outside world would only have access to checking the password through your script (unless they had shell access) so that would again help with not having the entire encrypted list nicked.

Hope this helps.

Regards Paul.

In reply to Re: Best practices for database passwords by thekestrel
in thread Best practices for database passwords by Miss Brain

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.