On a FreeBSD system, you can use the sysctl
command to modify the security.bsd.see_other_uids
parameter to prevent users from seeing information about processes owned by other users.
To prevent users from seeing information about processes owned by other users, you can use the following sysctl
command:
sysctl security.bsd.see_other_uids=0
This will prevent users from seeing information about processes owned by other users when using tools such as ps
and top
.
To allow users to see information about processes owned by other users, you can use the following command:
sysctl security.bsd.see_other_uids=1
To make the change persistent across reboots, you can add the security.bsd.see_other_uids
sysctl parameter to the /etc/sysctl.conf
file. For example:
security.bsd.see_other_uids=0
Note that preventing users from seeing information about processes owned by other users may increase security, but it may also make it more difficult for users to troubleshoot problems or perform certain tasks. It is recommended to carefully consider the potential impacts of this setting before enabling it.
For more information about using sysctl
to modify system parameters, you can refer to the sysctl
man page by running man sysctl
on the command line.