Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue with the "system" command

Status
Not open for further replies.

cheguvera

Programmer
Oct 13, 2005
32
GB
Hi All,

I have a question about the system command.

If I run some OS command from Perl script like ,

system("java -user ABCD -pass XYZ -deb") ;

The command I am running will execute, thats fine. But while the command is running, if some other user on the Unix box gives command like "ps -aef", he can see the details of the command I am running.

Is it possible to hide that command details appearing on the process details ??

Please suggest some way out.

Thanks and Regards
 
The short answer is no, but maybe somone else knows something that I am not aware of so check back.
 
The other user will need privileges to see your process running, are you trying to hide this from administrators, or do you have a number of users in the same group who can see each others workspaces ?

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Hi,

We have a typical setup.
A production server where we run our batch processes.

There are a set of read only users, which can login to the server for monitoring purpose and support.

Now, the user which runs processes, runs a process e.g.

$ some_executable_program -param1 -param2 -param3

The read-only users which login to the machine can run a command "ps -aef", they can see all the processes running on the server.

My question is, is it possible to hide the command details from appearing in the process list ?

Regards
 
I'm not aware of a trick which will hide the information you're worried about - not if you call the java executable like that.

If you don't specify a password what does the java executable do? If it does something useful like ask for the password you might be able to start Java up on the end of a pipe and then feed it the user-name and password.

Have a look at the java documentation:

1 - Is there a way to get the java executable to hide it's command line switches (it is possible to do that from within the same process)

2 - Is there a way to get the user/pass validated some other way?

Mike

I am not inscrutable. [orientalbow]

Want great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Although this more of a linux answer than a perl answer, you could try out grsecurity.

It has a restriction that allows a user to only view his/her processes.

Just my 2 cents!

X
 
moving this user into a different group is what I would have suggested, which is pretty much what Xaqte suggests

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top