1846854 Members
3337 Online
110256 Solutions
New Discussion

ps -ef limitation

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

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

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.

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