cancel
Showing results for 
Search instead for 
Did you mean: 

ps -ef limitation

 
Highlighted
Roger_AM
Established Member

ps -ef limitation

Hello,

 

The customer wants  to restrict  “ps –ef “ output. 

For security reasons they want  each user  , while typing  “ps  -ef” ,   sees  only processes executed by this user and not all processes running on the system.

 

 

NB :  my e-mail is    rabdelmassih@alcs.com.lb 

 

Thanks and Regards

 

Roger

 

4 REPLIES 4
Highlighted
Dennis Handly
Acclaimed Contributor

Re: ps -ef limitation

I suppose you would create an alias or function for these user that adds "-u $LOGNAME" to the end of the command line.

 

In general, why do you think this will improve security?

Highlighted
Roger_AM
Established Member

Re: ps -ef limitation

Hello ,

 

Thank you for your concern.

 

I tried  ps -ef   -u $LOGNAME   ,  but the output is still showing all processes.

 

Regards

 

Roger

Highlighted
Dennis Handly
Acclaimed Contributor

Re: ps -ef limitation

>I tried ps -ef  -u $LOGNAME, but the output is still showing all processes.

 

Then it looks like you need to parse the options and remove the -e.

Highlighted
Bill Hassell
Honored Contributor

Re: ps -ef limitation

Since ps is a standard HP-UX program, there are no controls for the options that users can choose. You'll have to write a wrapper script called ps and rename ps to another name (ie, ps.real). NOTE: The script must be written correctly to pass everything transparently to ps.real for all user IDs that are not restricted. There are many, many programs and scripts that require ps to work correctly.

 



Bill Hassell, sysadmin