introductioninstalling redhatunix commandsediting filesssh
sitemapapacheftptcp/ipmisc-notesresources

back  main
misc. cleanup

clear /etc/issue and /etc/issue.net
# cat /dev/null > /etc/issue
# cat /dev/null > /etc/issue.net
this will fill the contents of the two files with null (nothing) this is important as it removes an obvious identifier of what operating system/version you are running, making it harder to identify for hackers.

Identify the packages that are installed on your system.You can query all packages at once and output to your terminal
rpm -qa | less
this will list all packages installed, you can use the up and down arrow keys to scroll through the list.

shell logging
Normally the bash shell that you are using will store the last 1000 commands so you can use your up arrow to repeat a command without having to retype it. Sometimes a slip on the keyboard may cause a password to be typed out in clear text instead of a beiung blanked out on screen. Reducing the number of commands stored in your history will lessen the likelyhood of a hacker being able to review your history and find such a slip-up.
Edit /etc/profile and change the HISTSIZE=1000 to be HISTSIZE=20

disable the control-alt-delete keyboard shutdown command
edit /etc/inittab and comment out the following line:
# Trap CTRL-ALT-DELETE
#ca::ctrlaltdel:/sbin/shutdown -t3 -r now
This will disable the ability to use ctrl-alt-delete to shut down the server
Now, for the change to take effect type in the following at a prompt:
# /sbin/init q
This will tell init to re-examine the /etc/inittab file.

deny access to /etc/init.d for users other than root
change the /etc/init.d directories permissions so root is the only user allowed to access it
# chmod -R 700 /etc/init.d
This will disallow users other than root to even see the contents of your startup scripts.

back  main