The default username for a wordpress install is ‘admin’ and once it’s set there’s no getting rid of it so plan this *pre-install* !!!
Once a valid username is known then an attacker can try to guess the password by trying to log in with a dictionary list of thousands of passwords. Make it hard for them and don’t choose the default login name!
This article describes how to set WordPress AUTH KEY parameters in your wp-config.php file to secure your cookies. These will ensure that your authentication cookies are encrypted using unique random salts – Codeseekah has done a good write-up and explanation here.
This article describes how to find all instances of a file (or files matching a pattern) in a directory tree and then perform an action on them, e.g. deleting them.
There are many ways to skin this particular cat and this is one of them!
The basic find command syntax is:
find dir-name criteria action
dir-name : – Defines the working directory such as look into /tmp/
criteria : Use to select files such as “*.sh”
action : The find action (what-to-do on file) such as delete the file.
To remove multiple files such as *.jpg or *.sh with one command find, use:
The only difference between the above two syntax is that the first command remove directories as well whereas the second command only removes files. Options:
-name "FILE-TO-FIND" : File pattern.
| xargs rm -rf {} \; : Delete all files matched by file pattern.
-type f : Only match files and do not include directory names.
Example:
To delete all the readme.html and readme.txt files in a wordpress installation located in the /var/www directory you could first of all list them to make sure you’re not going to delete something you want to keep:
find /var/www/ -name readme.* | xargs ls -la {} \;