FreeBSD Prevent Users From Seeing Information About Processes Owned by Other Users
By default, on FreeBSD, users can see information about processes owned by other users by running the ps command. However, you can prevent users from seeing this information by enabling the security.bsd.see_other_uids sysctl option.
Here are the steps to prevent users from seeing information about processes owned by other users on FreeBSD:
- Log in as the root user or switch to the root user using the
sucommand. - Type the following command to enable the
security.bsd.see_other_uidssysctl option:
sysctl security.bsd.see_other_uids=0This command sets the value of the security.bsd.see_other_uids option to 0, which disables the ability of non-root users to see information about processes owned by other users.
- To make this change permanent, you will need to add the following line to the
/etc/sysctl.conffile:
security.bsd.see_other_uids=0This will ensure that the security.bsd.see_other_uids option is set to 0 every time the system boots up.
- Save and close the
/etc/sysctl.conffile.
security.bsd.see_other_uids sysctl option. Note that this will affect all users on the system except for the root user.