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

Q. When setting a hostname in Ubuntu 18 (using traditional methods: /etc/hostname and hostnamectl), it reverts back after reboot.

A.The setting is being reset by the service: cloud-init. This service has to be either disabled or a value set to bypass the hostname reset:

To bypass:

Edit /etc/cloud/cloud.cfg and set the following to true:

Problem: When trying to access the samba share from a Windows 2019 server or Windows 11/Windows 10 system, you get the "Wrong Password error". Command line gives a more specific error, with a code:

System error 86 - The specified network password is not correct.

Solution:

Add the following option into the Samba config file (/etc/samba/smb.conf):

ntlm auth = true

This should stop the wrong password prompts and allow the Windows system to access Samba.

Steps to convert a physical disk to a virtual one on a linux system:

Install qemu-utils:

apt-get install qemu-utils

Assuming the physical disk is plugged in and it is /dev/sda, the command is as following:

qemu-img convert -O vdi /dev/sda /full/path/output.vdi

The output.vdi can then be attached as a drive to VirtualBox

journald is systemd's logging service. It is a utility for querying and displaying logs from journald. The logs for this service are stored in /var/log/journal/, which can accumulate quickly. If you have a system that you need to clean up quickly, getting rid of old journals is one way. There are 2 ways to do it: 

By limiting the size of the journal:

journalctl --vacuum-size=200M

Or going by the number of days:

journalctl --vacuum-time=5d

Under normal circumstances, you should not have to touch these directories, as they rotate and space is freed on it's own.

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:

Last updated Apr 7, 2024