roll with it. however, I see another danger: At some point, admins will get lazy and not want to log in and restart the thing again and again, so they hardcode the password somewhere.

rule 1: make sure it is stable and does not need much restarting.

In most cases, you log the error, then die. And a process-monitor/helpdesk should pick up it's absence.
In some cases, the daemon needs to be up just to tell other applications it is down. (like a webserver without database backend)

Some ideas for the latter case:

Daemon detects it starts password-less, and without a TTY to ask for $pwd=<STDIN>
It does $0 = $0 . ' - NOPASSWORD' so you can see with ps -ef the state it is in.

You run a local small sendpwd perlscript that:

0. Does not show the password with ps -ef
1. sends the daemon a SIGUSR1, the daemon then creates a named pipe. for example: /tmp/fifo
2. Once the daemon gets a valid password it closes and deletes the pipe.
3. The daemon updates its process name by removing the "- NOPASSWORD" it had with $0 =~ s/ - NOPASSWORD$//;

The obvious solution was a special https web-page where you can input your password, but that was deemed undesirable by audit. figures.
nb: because nobody logged into the machine, there was no audit trace of an action. (yes, all history files were copied to a security server)


In reply to Re: Accessing passwords in a script by FreeBeerReekingMonk
in thread Accessing passwords in a script by nysus

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.