# help sockstat



## paddy (May 25, 2009)

halo guys i'm kinda new here ...
i wanna ask on how to limit my user for using sockstat command , so when my user type : sockstat only the user proces will show up not all sockstat proses.
hope some 1 can help me with this 1.
thanks before


----------



## SirDice (May 25, 2009)

AFAIK you can't.


----------



## vivek (May 25, 2009)

Yes, you can prevent users from seeing information about processes that are being run under another UID. This applies to common commands such as ps, top, sockstat and others (including program written in C for snooping around). Add the following:

```
echo 'security.bsd.see_other_uids=0' >> /etc/sysctl.conf
```
At shell type the following to activate it:

```
sysctl security.bsd.see_other_uids=0
```
Also set security.bsd.see_other_gids to zero.


----------



## SirDice (May 25, 2009)

I didn't know that also worked for sockstat. I was under the impression it only worked for ps.


----------



## paddy (May 25, 2009)

*thanks bro*

its work bro thanks a lot for your help


----------

