bsdzone BSDZone - FreeBSD help, how-to guides, and articles.

  [ Home ]   [ Current News ]   [ Howto Archive ]   [ Books ]   [ Search ]   [ Links ]   [ Contact ]  [ About ]  


Limit ps output for users on FreeBSD 4.x.
Security Tips - 12 Jun 05

Limit ps output for users on FreeBSD 4.x.

When running a FreeBSD 4.x machine with multiple users, such as a webhost, ps -aux will show the output of every running process on the machine.

I don’t like other people seeing what I am running, especially when I am running it as root.

To disable this try
sysctl kern.ps_showallprocs=0

su - someotheruser
ps -waux

To make the change withstand a reboot, add this into /etc/sysctl.conf
kern.ps_showallprocs=0

This will however not stop users from cruising the proc filesystem and sneaking a peak.
If you feel the need to stop that, just add the noauto option to it in /etc/fstab, like so.
proc /proc procfs rw,noauto 0 0

But take note that programs like ps and w may not work completely.


Leave a Reply