Tag: linux

Simple SSH bruteforce prevention using iptables

Since I like to learn more about scripting, I decided to write my own SSH bruteforce prevention script instead of installing a plug-and-play tool. You can run the script manually or have it run every hour or so using crontab. As root, create a new directory for the script and files, name it for example […]

Plesk: Unable to connect to database: saved admin password is incorrect

Symptom: Not able to log in to Plesk Panel. The following MySQL error is shown instead of the login screen: ERROR: PleskFatalException Unable to connect to database: saved admin password is incorrect. 0: common_func.php3:150 ¬†¬† ¬†psaerror(string ‘Unable to connect to database: saved admin password is incorrect.’) 1: auth.php3:107 ERROR: PleskFatalException Unable to connect to database: […]

Monitoring I/O on Linux

You can use iostat to find out disk utilization, but with iotop you can monitor the actual read/write. iotop watches the I/O usage information output by the kernel and displays it in a table of current I/O usage by processes. iotop syntax for monitoring I/O usage -o Will only show processes or threads which are […]

DirectAdmin: Unable to determine Usertype user.conf needs to be repaired

I jut have installed DirectAdmin, but could not log in to DirectAdmin, I got the following error message: Unable to determine Usertype user.conf needs to be repaired I quickly solved this by running: # cd /usr/local/directadmin # ./directadmin i If this doesn’t solve the problem, let me know and I will assist you.

Plesk: 500 – Internal Server Error

Probably you just have tried to login to Plesk and got the following message: 500 – Internal Server Error The easiest way is to check the log file of Plesk: # cat /var/log/sw-cp-server/error_log If you couldn’t find any strange messages (except the SSL warnings, those are known) then you can try the following, it will […]

Plesk FTP not working: 421 Service not available, remote server has closed connection

When you have Plesk running on your server and FTP is not working because of the following error message: 421 Service not available, remote server has closed connection Then probably the hostname is not set up correctly. Please run the following command, you should get ‘unknown host’: # ping `hostname` If this is case, please […]

How to reset the MySQL root password

If you have forgotten the mysql root passwod, you can set a new password if you have root access to the server. 1. Stop MySQL server. # /etc/init.d/mysql stop 2. Start MySQL with –skip-grant-tables option. # mysqld_safe –skip-grant-tables & 3. Connect to MySQL as root. # mysql -u root 4. Set new mysql root password. […]

6 System Monitoring tools for Linux

1. top – Display Linux tasks The top program provides a system summary information as well as a list of tasks currently running. 2. free – Memory usage The free program will display amount of free and used memory in the system. Sample (the option ‘-m’ will show the results in megabytes): # free -m […]

Starting Plesk failed after upgrade to Plesk 10.2.0

I have seen a lot of topics about failing Plesk to start after upgrading to 10.2.0. I have got the same problem, the error message was: Restarting SWsoft control panels server…Duplicate config variable in conditional 1 global/SERVERsocket==:8443: fastcgi.server 2011-04-17 17:44:02: (configfile.c.838) source: /usr/share/sw-cp-server/applications-conf.sh line: 103 pos: 14 parser failed somehow near here: (EOL) 2011-04-17 17:44:02: […]

How to block IP and Ports with IPtables

How to block IP and/or Ports with IPtables under Linux? Blocking an incoming port First you have to know the port number which you want to block, for a list of port numbers you can use /etc/services as a reference. The syntax is as follow (make sure you are root or have root privileges): # […]

Ads

Ads