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

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. 

ubuntu10The network configuration has changed in Ubuntu 18 from all the previous versions. The new version uses Netplan and it is somewhat harder if you don't know yaml. The discussion for pros and cons of this move by Ubuntu can be infinite (why change what's working; this is a tool, I don't want to learn the new ways, etc.), but this is a quick tutorial for quickly changing the IP address. (There's more information available on Netplan)

The network configuration files are located in /etc/netplan. Configuration file can be opened as below:

vim /etc/netplan/50-cloud-init.yaml

With comments removed, this is the configuration data for a simple DHCP setup:

Last updated Mar 18, 2024