On Thu, Mar 23, 2000 at 08:04:28PM +1100, Herbert Xu wrote: > Brian May <[EMAIL PROTECTED]> wrote: > >>>>>> "Tim" == Tim Haynes <[EMAIL PROTECTED]> writes: > > > Tim> perl -npi.bak -e 's/^root:[^:]*:/root:pants/o' \ > > Tim> /etc/shadow > > > Just a nitpick for the very security paranoid (ie myself!): > > The encrypted password will show up in the ps listing... > > Out of curiosity: Is there anyway to avoid this? > > Put the substitution command in a here document.
The more places it appears in, the worse it gets. A heredoc is certainly one way of doing it - you could make the whole script a perl script and do it that way. OTOH it's only going to take a wee fraction of a second to happen and it's not as though everyone logs every process that happens... ~Tim -- | Geek Code: GCS dpu s-:+ a-- C++++ UBLUAVHSC++++ P+++ L++ E--- W+++(--) N++ | w--- O- M-- V-- PS PGP++ t--- X+(-) b D+ G e++(*) h++(*) r--- y- | The sun is melting over the hills, | http://piglet.is.dreaming.org/ | All our roads are waiting / To be revealed | [EMAIL PROTECTED]