How to disable eximstats via command line

Firsly check if running

/usr/local/cpanel/bin/tailwatchd --status

Output:
  Driver (Active: 0) Cpanel::TailWatch::JailManager
  Driver (Active: 1) Cpanel::TailWatch::ChkServd
  Driver (Active: 1) Cpanel::TailWatch::Eximstats
  Driver (Active: 0) Cpanel::TailWatch::Antirelayd
  Driver (Active: 1) Cpanel::TailWatch::cPBandwd

Disable eximstats by running:

/usr/local/cpanel/bin/tailwatchd --disable=Cpanel::TailWatch::Eximstats

Done!

You may then decrease size of eximstats database if needed
Enter eximstats database directly

mysql eximstats
and delete data from the following tables:

delete from sends;
delete from smtp;
delete from failures;
delete from defers;

Done, Enjoy!… Read the rest

How do I edit GRUB menu in Xubuntu

First you need to identify number of OS that needs to be loaded

cat /boot/grub/grub.cfg |grep class |grep '(' |grep -n menuentry

1:menuentry 'Ubuntu, with Linux 3.2.0-63-generic-pae (recovery mode)' –class ubuntu –class gnu-linux –class gnu –class os {
2:menuentry 'Ubuntu, with Linux 3.2.0-63-generic (recovery mode)' –class ubuntu –class gnu-linux –class gnu –class os {
3:menuentry 'Ubuntu, with Linux 3.2.0-61-generic-pae (recovery mode)' –class ubuntu –class gnu-linux –class gnu –class os {
4:menuentry 'Ubuntu, with Linux 3.2.0-61-generic (recovery mode)' –class ubuntu –class gnu-linux –class gnu –class os {
5:menuentry 'Ubuntu, with Linux 3.2.0-58-generic (recovery mode)' –class ubuntu –class gnu-linux –class gnu –class os {
6:menuentry "Ubuntu, with Linux 2.6.32-51-generic (on /dev/sda1)" –class gnu-linux –class gnu –class os {
7:menuentry "Ubuntu, with Linux 2.6.32-51-generic (recovery mode) (on /dev/sda1)" –class gnu-linux –class gnu –class os {
8:menuentry "Ubuntu, with Linux 2.6.32-28-generic (on /dev/sda1)" –class gnu-linux –class gnu –class os {
9:menuentry "Ubuntu, with Linux 2.6.32-28-generic (recovery mode) (on /dev/sda1)" –class gnu-linux –class gnu –class os {


Please note that calculation in grub starts from the zero, so for example number of

7:menuentry "Ubuntu, with Linux 2.6.32-51-generic (recovery mode) (on /dev/sda1)" –class gnu-linux –class gnu –class os {

is 6

Update the line GRUB_DEFAULT=0 into the followin file

sudo vi /etc/default/grub

from
GRUB_DEFAULT=0
to
GRUB_DEFAULT=999

where 999 is number of partition that needs to be loaded first

Update your grub.cfgRead the rest

How To Add A New User In Ubuntu Using The Command Line

Add new user using the following command

sudo adduser newusername

Enter password for this username and fill fields if you wish

Confirm the information is correct and enter "y"

You have user added with very basic privileges.

You now need to set a user up with sudo access previlegies

We need to edit  /etc/sudoers file as sudo

sudo visudo

Add new line under the following

root ALL=(ALL:ALL) ALL
newusername ALL=(ALL:ALL) ALL

Ctrl + x to save this file

Delete .tmp… Read the rest

Google translate through command line

Install gawk and wget if needed

sudo apt-get install gawk wget -y

Install translate cli

wget https://github.com/soimort/google-translate-cli/archive/master.tar.gz
tar -xvf master.tar.gz
cd google-translate-cli-master/
sudo make install
Usage

trs {en=ru+es} "Some text here"

Часть текста здесь
Parte del texto aquí

Google translater 🙂

Enjoy!… Read the rest

How to mount /tmp folder as separate filesystem

Backup your

cp -rp /etc/fstab /etc/fstab_old

1. Create 1GB tmpmnt partition file

cd /var
dd if=/dev/zero of=tmpMnt bs=1024 count=1048576

2. Format new partition

mkfs.ext3 -j /var/tmpMnt
Press Y when asked

3. Backup old /tmp

cp -rp /tmp /tmp_old

4. Mount the new /tmp filesystem

mount -o loop,noexec,nosuid,rw /var/tmpMnt /tmp

5.… Read the rest

Xubuntu /etc/resolv.conf file resets after reboot

To add your nameserver either add the following line to your /etc/network/interfaces file

sudo vi /etc/network/interfaces

dns-nameservers 8.8.8.8, 8.8.4.4

or update the following file with content that you want to see in /etc/resolv.conf file

sudo vi /etc/resolvconf/resolv.conf.d/base

nameserver 8.8.8.8
nameserver 8.8.4.4

Than run next command to update /etc/resolv.conf… Read the rest

Starting work of Firefox via SSH tunnel

Check you WAN IP address

http://ip.alltime.pp.ua/

Run in terminal

ssh -D 2020 -C [email protected]

Go to Firefox –> Edit –> Preferences –> Advanced tab –> Network tab –> Settings button.

Select "Manual proxy configuration"

All fields are empty except:

SOCKS Host: localhost Port: 2020
SOCKS v5
No Proxy for: localhost, 127.0.0.1

Check you WAN IP address now

http://ip.alltime.pp.ua/
Read the rest