Tag Archives: Servers

Add User to Nagios

It is not exactly easy to add a new user to Nagios but this is how it can be done.


If using ubuntu you will need to modify /usr/local/nagios/etc/cgi.cfg

The important one to view the information on the web interface is “authorized_for_system_information”.  It should look like this if you are adding multiple users.


There are more fields that you can use.  These are all the categories that nagiosadmin (the default account) is in.


Continue reading Add User to Nagios

Restart Networking Ubuntu 14.04

Of  course they had to change the way you restart interfaces in Ubuntu 14.04.  Here is how to restart your interface.  Make sure you select the correct interface, the example below is for eth0.  You can check you interface name in ifconfig.

ifdown eth0 && ifup eth0

To add DNS after adding a static IP you will need to set your name servers in /etc/resolvconf/resolv.conf.d/base



Update resolvconf

resolvconf -u

Then restart resolvconf for shits and giggles

service resolvconf restart

Changing Multiple Directory and File Permissions

After setting up your website it is always a good idea to change the directory and file permissions.  This makes it a little harder for an attacker to compromise your site.  For Joomla and WordPress it is best practice to set your directory permissions to 755 and your file permissions to 644.  In addition to this, WordPress recommends setting the wp-config.php file to 600.


Using the code below, go to the root directory of your website and run the following commands.


find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;



Create Joomla Website in ISPConfig

Create web site using ISP Config

  • If a new client, under “client” tab, select “Add new client” button
    • Enter relevant client information
    • “Save” entry
  • Under “DNS” tab, use the main “Add new DNS Zone (SOA)” button, not the text link on the left.
    • Choose the DNS server
    • Choose the appropriate client
    • For “Zone”, enter the domain name (Do not include “www”)
    • Set “NS” as ns3.mpl.com
    • Set “e-mail” as administrator.mail.mpl.com
    • Under “Records” tab, create the following Continue reading Create Joomla Website in ISPConfig

Backup Server with Ubuntu and Dirvish


Install Dirvish, rsync and ssh on the backup server:

apt-get install dirvish ssh 

/etc/dirvish/master.conf should look something like this:


expire-default: +15 days
        #MIN    HR      DOM     MON     DOW     STRFTIME_FMT
        *       *       *       *       1       +3 months
        *       *       1-7     *       1       +1 year
        *       *       1-7     1,4,7,10 1
        *       10-20   *       *       *       +4 days

Create a dirctory where all backup’s will be stored: Continue reading Backup Server with Ubuntu and Dirvish

Adding a group to Sudoers

Recently on our VPS servers there has been no admin group on a default Ubuntu install. Here is the solution.

Add an admin group to the Ubuntu install.

[cc lang=’bash’ ]addgroup admin[/cc]

Now you will need to add any users you want to have root privileges to the admin group.

[cc lang=’bash’ ]adduser cbrown admin[/cc]

Now go to the edit the sudoers file to include the admin group.

[cc lang=’bash’ ]nano /etc/sudoers[/cc]

and insert the following at the bottom of the file.

[cc lang=’bash’ ]# Members of the admin group may gain root privileges[/cc]
[cc lang=’bash’ ]%admin ALL=(ALL) ALL[/cc]

Continue reading Adding a group to Sudoers

Setup PureFtp on VPS

After fighting getting this setup on Tuesday and Wednesday I ended up succeeding and didn’t take any notes.  So of course here I am this morning having the exact same problem and trying to go off memory.

Now lets review what has been done so far.  I have had a VPS server imaged with Ubuntu 9.04 32-bit and the installed ISPConfig 3 from this tutorial. http://www.howtoforge.com/perfect-server-ubuntu-9.04-ispconfig-3-p3 (Start at page 3 if you have had your image installed.)

First after you have finished the ISPConfig tutorial go into the /etc/pure-ftpd/db folder and copy the file mysql.conf to a safe directory. I used /root.

This is important because the ISPConfig setup has already configured the file with your database username, password, table to be used, and etc.  So it is easier to copy the file and use it after we have reinstalled PureFTP. Continue reading Setup PureFtp on VPS