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.
|
|---|