Canada  united states of america usa  linkedinfacebook   Call Us Today: 866.646.6461

In order to setup the Tomato Firmware router as an access point, the following steps have to be completed. This is a setup for a home environment. If you are setting this up for a workplace, the IP address range should be something other than 192.168.1.1 (as it is too common). Same goes for the Subnet, it should be something other than 255.255.255.0, if you need more than 254 IPs.

Changing the domain name and hostname in Zentyal server (LDAP) will erase all users and user info (for email) once the Samba has been provisioned. Neverthless, the change can be done by going to System > General.

linux icon 19With the bigger disks that are no longer supported by MBR there's a constant need to convert to GPT.

We have done this using a live disk, however, it is always important to create system backups. The disk was 6TB, with 2 smaller live partitions. Without converting to GPT we could not take advantage of the entire disk capacity. Assuming that the disk is /dev/sdb (the first 2 partitions are /dev/sdb1 and /dev/sdb2). Below instructions are not for a bootable disk, rather a secondary partition.

linux icon 19On occasion you may get a nasty error like this (BadCRC generally means bad sectors):

[4530467.649165] ata2.00: exception Emask 0x10 SAct 0x60000000 SErr 0x280100 action 0x6 frozen
[4530467.649608] ata2.00: irq_stat 0x08000000, interface fatal error
[4530467.650043] ata2: SError: { UnrecovData 10B8B BadCRC }

But the problem is mapping the drive ata2 to an actual disk drive device. This can be achieved by running this command:

linux icon 19This is how you can find out which IP is assigned to a computer using dnsmasq. Unless you've specified a different log for dnsmasq, the output will go into syslog (/var/log/syslog).

A quick way to isolate the requests, is by running this command:

cat /var/log/syslog | grep "DHCPACK"

This will produce a list of IPs assigned, with a MAC address and hostnames:

linux iconThis is a nice little command to search and replace one type of content with another. It recursively parses through directories and files.

Be very careful when running this command, because it can do a lot of damage

Below is an example of replacing all "http" with "https" inside a directory /var/www:

postfix-emailSometimes we have emails going to a particular address, which cannot be stopped. There are many reasons, but most common is an invalid address, which pollutes the mail queue with invalid entries. The simplest way to solve this is by adding a DISCARD directive for postfix. 

If you don't have it already, add this line in main.cf

header_checks = regexp:/etc/postfix/header_checks

Let's say you've gotten a bigger disk (or just resized a VM partition) and now would like to use the extra space. Since for this example we are using LVM, the resizing has to be done using the following steps:

Assuming you want to use all of the free space, let's see what we got: 50Gb before resize

FFmpegThere are many tools, including free ones that allow for video conversion, however, many of them use GUIs and don't allow for automation of tasks. FFmpeg is a command line based tools which allows to do very neat video manipulations.

We would like to share this small script, which our IT specialists have used for one of our video conversion projects. It parses a directory, finds all flv (Flash video) files and converts them to mp4. This script can be added to a cronjob to run on a scheduled basis. Converted videos can be moved elsewhere upon completion. 

As mentioned, we've used ffmpeg to accomplish this task, running under Ubuntu 14.04. FFmpeg doesn't come with Ubuntu 14.04 and a package repository needs to be added manually first. 

Last updated Jun 13, 2021