Fiber Hosting

Affordable Professional Dedicated and Co-Location Services

Documentation and Tutorials by Fiber-Hosting LLC

Created for the novice server administrator of unix and linux powered servers.

Posts Tagged ‘Secure linux’

 

Securing “ps”

Thursday, February 7th, 2008

 This is one way we secure ps to keep normal users from reading all the processes on the server. We know there are other ways to do this and if you would like to share please do.

  •  Moving ps
  1. mv /bin/ps /usr
  • Editing new ps
  1. vi /bin/ps
  2. We are creating a bash script listed below:

#!/bin/bash

if [ “$(whoami)” != “root” ]; then/usr/ps x

fi

if [ “$(whoami)” = “root” ]; then

/usr/ps $1

fi

  • Allowing ps to run
  1. chmod +x /bin/ps

su - into a normal users login and try and use ps -aux should default and make user ps x


    Warning: include(/usr/home/admin/domains/fiber-hosting.com/public_html/includes/quotes.php) [function.include]: failed to open stream: No such file or directory in /home/fiber/public_html/docs/wp-content/themes/default/footer.php on line 3

    Warning: include() [function.include]: Failed opening '/usr/home/admin/domains/fiber-hosting.com/public_html/includes/quotes.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fiber/public_html/docs/wp-content/themes/default/footer.php on line 3


    Entries (RSS) and Comments (RSS).