Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: Is there a way with IPC::Run to hide command options from process table?

by BrowserUk (Pope)
on Jul 23, 2013 at 15:15 UTC ( #1045895=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Is there a way with IPC::Run to hide command options from process table?
in thread Is there a way with IPC::Run to hide command options from process table?

So to your point, yes the information is visible and that is not always a good thing.

Then I guess you legitimised your requirement :) How about:

#! perl ... my $pid = open CMD, '|-', 'usermod', '-p', ...; print CMD 'password'; close CMD;

Presumably you can secure the script.

You can then take it a step further and put the password, probably encrypted, in a hidden, only-readable-by-the-current-user, file, and arrange for the perl script to read that file, decrypt the password and then supply it to the command via the pipe.

Thus you can make the script generally available, but only usable from accounts that have the appropriate file, with an appropriately encrypted password, in the appropriate place.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^5: Is there a way with IPC::Run to hide command options from process table?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1045895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2014-08-02 07:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (55 votes), past polls