Remove LibreOffice on Ubuntu in terminal

To remove LibreOffice on Ubuntu in terminal:

sudo apt-get remove libreoffice-core

If you also want to remove LibreOffice configuration files, use the purge switch:

sudo apt-get remove --purge libreoffice-core

That’s all folks!


Sed replace path with slash separators

Sed replace path with slash separators by using a different separator char.

If you have an environment variable that contains a slash like a path, let say

addons_path = /home/netjunky/projects/odoo-dev/odoo/openerp/addons

and you want to replace “addons_path = /home/netjunky/projects/odoo-dev/odoo/openerp/addons” with “addons_path = /home/netjunky/projects/odoo-dev/odoo/custom/addons” using sed, usually you would try something like this

sudo sed -i  ‘s/addons_path = */addons_path = /home/netjunky/projects/odoo-dev/odoo/custom/addons/’ /home/netjunky/projects/odoo-dev/odoo/config/openerp-server.conf

this raise an error like

sed: -i expression #1, char 9: unknown option to `s’

but if you try

sudo sed -i  ‘s|addons_path = *|addons_path = /home/netjunky/projects/odoo-dev/odoo/custom/addons,|’ /home/netjunky/projects/odoo-dev/odoo/config/openerp-server.conf

It works!!!

You can use any other separator instead of |.


Run Odoo on port 80 instead of 8069

Setup your ubuntu server and run Odoo on port 80 instead of 8069

1.) Connect with ssh client to your Ubuntu server
2.) Use your favorite text editor (vim, nano…) to edit /etc/rc.local file

sudo nano /etc/rc.local

3.) Paste this into /etc/rc.local file

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8069

4.) Reboot your Ubuntu server to see effect

sudo reboot

5.) Access Odoo on port 80

That’s all folks!


Enable linux root access on Microsoft Azure Cloud

How to enable linux root access on Microsoft Azure Cloud

1. Login via ssh using your sudo user on your Microsoft Azure linux server

2. Now login as root user

[root@lin ~]# sudo su -

3. check if root access is set (LOCK means that root access is disabled)

[root@lin ~]# grep root /etc/shadow


4. enable root access  (as root user enter command passwd)

[root@lin ~]# passwd

5. Now enter your password and root access is enabled.

You can check this by using command “grep root /etc/shadow”

That’s all folks


Delete exim queue

Delete exim queue sometimes is impossible task.
There are just to many emails and queue manager is to slow.

You can use this dirty trick:

cd /var/spool/exim
find input -type f -exec rm -rf {} \;
find msglog -type f -exec rm -rf {} \;
service exim restart

This will erase all your emails from queue.

Enable POP before SMTP authentication

POP before SMTP authentication is not enabled by default as of cPanel & WHM 11.32.
You can enable this option from WHM > Service Configuration > Service Manager > Antirelayd.
SMTP authentication is still supported and enabled by default.