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:

  1. Log in as the root user or switch to the root user using the su command.
  2. Type the following command to enable the security.bsd.see_other_uids sysctl option:
sysctl security.bsd.see_other_uids=0

This 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.

  1. To make this change permanent, you will need to add the following line to the /etc/sysctl.conf file:
security.bsd.see_other_uids=0

This will ensure that the security.bsd.see_other_uids option is set to 0 every time the system boots up.

  1. Save and close the /etc/sysctl.conf file.

That’s it! You have prevented users from seeing information about processes owned by other users on FreeBSD by enabling the security.bsd.see_other_uids sysctl option. Note that this will affect all users on the system except for the root user.

Leave a Comment