Add 32bit package support for Debian/Ubuntu/Mint

Many applications which look for 32bit packages on your Debian/Ubuntu/Mint packages would need ia32-libs packages. Earlier it was possible to get this package installed and later on it has been removed from all distributions. The best way to get back the 32bit package support is to add the architecture to dpkg as follows:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs

Fix Zimbra stats graph/cron jobs

If your zimbra scheduled tasks are not running or if you don’t see your stats graphs on admin panel, the first thing that you should check if zimbra’s cronjobs. When you reinstall/move your zimbra installation we normally tend to miss cron job setups required for zimbra.

To fix this, find the Zimbra crontabs directory at /opt/zimbra/zimbramon/crontabs

Now, lets put alwal the cronjob’s to a single file (just to make your job easier) as follows:

[[email protected] crontabs]# cat crontab >> crontab.zimbra
[[email protected] crontabs]# cat crontab.ldap >> crontab.zimbra
[[email protected] crontabs]# cat crontab.logger >> crontab.zimbra
[[email protected] crontabs]# cat crontab.mta >> crontab.zimbra
[[email protected] crontabs]# cat crontab.store >> crontab.zimbra

Finally,Load the crontab.zimbra file to crontab as follows:

[[email protected] crontabs]# crontab crontab.zimbra

Voila, that’s it. Wait for few minutes to start seeings the graphs. You can also verify the cornjobs by using ‘crontab -l’.

Vmware Workstation 10.x patch for Linux kernel 3.13

Vmware Workstation breaks if you try using upcoming Linux kernel release’s and at the same time, VMWare community moves fast to push a quick patches to applied for those who dare to use cutting edge beta OS on their machines.

WoodyZ on https://communities.vmware.com provides a patch which just works for Linux Kernel 3.13.

Here is the patch provided from WoodyZ for your quick reference.

Apply the patch to /usr/lib/vmware/modules/source/vmnet.tar (Extract, apply the patch using patch command, compress the files back to vmnet.tar) and run vmware workstation again.

 

--- vmnet-only/filter.c 2013-10-18 15:11:55.000000000 -0400
+++ vmnet-only/filter.c 2013-12-21 20:15:15.000000000 -0500
@@ -27,6 +27,7 @@
#include "compat_module.h"
#include <linux/mutex.h> #include <linux/netdevice.h> +#include <linux/version.h> #if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
# include <linux/module.h> #else
@@ -203,7 +204,11 @@
#endif</code>

static unsigned int
+#if LINUX_VERSION_CODE &lt; KERNEL_VERSION(3, 13, 0)
VNetFilterHookFn(unsigned int hooknum, // IN:
+#else
+VNetFilterHookFn(const struct nf_hook_ops *ops, // IN:
+#endif
#ifdef VMW_NFHOOK_USES_SKB
struct sk_buff *skb, // IN:
#else
@@ -252,7 +257,12 @@

/* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */
/* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */
- transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
+
+#if LINUX_VERSION_CODE &lt; KERNEL_VERSION(3, 13, 0)
+ transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
+#else
+ transmit = (ops-&gt;hooknum == VMW_NF_INET_POST_ROUTING);
+#endif

packetHeader = compat_skb_network_header(skb);
ip = (struct iphdr*)packetHeader;

Allow access to external git repositories

Many public git repositories have several alternate URLs; for instance, the kernel.org repositories have git://, http://, and https:// URLs.

The common URL schemes for git repositories are:

ssh:// – default port 22
git:// – default port 9418
http:// – default port 80
https:// – default port 443

Above list gives you the respective ports which needs to be kept open on the firewall to be able use your Git repositories.

The git:// protocol uses port 9418, so you should make sure your firewall allows outbound connections to this port.

If you use csf ensure this port is enabled in TCP_IN and TCP_OUT.

To test if the git:// is working you can try the following command on the server

netstat -ntpl|grep -i 9418

To test it externally you can telnet to the port for the respective server’s ip.

Retrieve Zimbra LDAP master URL

If you’re trying to work on Zimbra migration etc, you might require to know the Zimbra LDAP master URL. Generally it should work as ldap:domainname:389, if it doesn’t then use the following command as zimbra to get the right ldap master url.

#su – zimbra
$zmlocalconfig -s zimbra_ldap_password ldap_master_url

The same command might reveal the admin password too.
You can also use the following commands to retrieve the ldap admin password:

#su zimbra
$zmlocalconfig -s | grep ldap_amavis_password
$zmlocalconfig -s | grep ldap_nginx_password
$zmlocalconfig -s | grep ldap_postfix_password
$zmlocalconfig -s | grep ldap_replication_password
$zmlocalconfig -s | grep ldap_root_password
$zmlocalconfig -s | grep zimbra_ldap_password

Reference: Set the password in the LDAP database

Enable Zimbra to work on port 80

If you want Zimbra to work on both port 80 and 443, You can use the following commands:

su zimbra –
zmtlsctl both

After this, restart zimbra and you will be able to login to Zimbra on port 80 as well.

PS: Running Zimbra on port 80 is not secure.

Changing the Zimbra server’s hostname

If you’re changing your system and trying to reconfigure your zimbra, you might have to use the following commands:

su – zimbra
/opt/zimbra/libexec/zmsetservername -n

The above commands come very handy when you might have mistakenly typed a wrong hostname and configured zimbra to continue using it.

Before making changes to the zimbra server name, ensure the hostname and the DNS is configured fine.

For more info refer to: http://wiki.zimbra.com/index.php?title=Zmsetservername

Reset Self-Signed Certificates on Zimbra

Self-Signed Certificate on your Zimbra server is expired? Follow the instructions given below, and you will be back online asap.

1. Begin by generating a new Certificate Authority (CA).

/opt/zimbra/bin/zmcertmgr createca -new

2. Then generate a certificate signed by the CA that expires in 365 days.

/opt/zimbra/bin/zmcertmgr createcrt -new -days 365

3. Next deploy the certificate.

/opt/zimbra/bin/zmcertmgr deploycrt self

4. Next deploy the CA.

/opt/zimbra/bin/zmcertmgr deployca

5. To finish, verify the certificate was deployed to all the services.

/opt/zimbra/bin/zmcertmgr viewdeployedcrt

Resetart your zimbra and you will be good.
I have this tested against Zimbra 8.

Reference: http://wiki.zimbra.com/wiki/Administration_Console_and_CLI_Certificate_Tools#ZCS_6.0.x_and_5.0.x