Mount host directory inside LXD container. Create a directory on a host operating system. $ sudo mkdir /mnt/disk/archivebox Look for subuid and subgid files. $ ls /snap/lxd/current/etc/ bash_completion.d ethertypes logrotate.conf lvm nanorc protocols ubuntu-sb.crt vimrc Snap pack … | Continue reading
Display wget downloaded content on standard output. $ wget --quiet --output-document - gentoo.org/robots.txt User-agent: AhrefsBot Disallow: / User-agent: * Allow: / Excerpt from the manual page. [...] -O file --output-document=file The documents will not be written to the approp … | Continue reading
Set the title for GNOME terminal emulator. Define the title for the current terminal tab Inspect GNOME terminal source code to identify the escape characters. [...] TerminalScreen * terminal_screen_new (GSettings *profile, const char *title, double zoom) { g_return_val_if_fail (G … | Continue reading
Display the BIND version and learn how to hide it. Query a specific BIND server for a TXT resource record in class 3 (CHAOS) for the version.bind domain name using nslookup utility. $ nslookup -q=txt -class=CHAOS version.bind 10.10.10.10 Server: 10.10.10.10 Address: 10.10.10.10#5 … | Continue reading
Disable onboard WiFi and Bluetooth on Raspberry Pi 4 device. List Bluetooth devices. $ hcitool dev Devices: hci0 E4:5F:01:42:3A:4B List wireless devices $ iw dev phy#0 Unnamed/non-netdev interface wdev 0x2 addr e6:5f:01:42:3a:4a type P2P-device Interface wlan0 ifindex 3 wdev 0x1 … | Continue reading
Configure minimal MIT Kerberos server. Preparations Update package index. $ sudo apt update Upgrade operating system. $ sudo apt upgrade Ensure that hostname is defined. $ sudo hostnamectl --static set-hostname kerberos.octocat.lab Inspect hosts file which should be in its initia … | Continue reading
Specify the exact list of enabled PAM profiles using a simple workaround. You can use pam-auth-update utility interactively. You can also enable a specific profile in a non-interactive way. This is enough in most cases. $ pam-auth-update --enable pwquality But how to specify the … | Continue reading
Unlock user account in Samba Active Directory User account can get locked out after a number of failed login attempts. $ samba-tool domain passwordsettings show Password information for domain 'DC=octocat,DC=lab' Password complexity: on Store plaintext passwords: off Password his … | Continue reading
Configure static IP address on Raspberry Pi 4 device. IP address on Raspberry Pi 4 device is controlled by a DHCP client service. $ sudo systemctl status dhcpcd.service * dhcpcd.service - DHCP Client Daemon Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor prese … | Continue reading
Configure wireless network on Raspberry Pi 4. Inspect ISO 3166 alpha-2 country codes. $ cat /usr/share/zoneinfo/iso3166.tab # ISO 3166 alpha-2 country codes # # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. # # From Paul Eggert (2015-05 … | Continue reading
Configure SSH access using Samba Active Directory. Preparations Ensure that a Fully Qualified Domain Name is defined. $ sudo hostnamectl --static set-hostname voyager.octocat.lab Read how to configure persistent DNS resolver to ensure that server is using DNS resolver provided by … | Continue reading
Manage global password policy settings in Samba Active Directory. Display current password settings for the domain. $ sudo samba-tool domain passwordsettings show Password information for domain 'DC=octocat,DC=lab' Password complexity: on Store plaintext passwords: off Password h … | Continue reading
Manage UNIX groups and users in Samba Active Directory. Create groups. $ sudo samba-tool group add cats --gid-number 8000 --nis-domain OCTOCAT --description "Cats group" Added group cats $ sudo samba-tool group add vampires --gid-number 8001 --nis-domain OCTOCAT --description "Va … | Continue reading
Use SingleFile to archive entire web page in a single HTML file. Browser extension Install browser extension for Firefox, Chrome or Edge. This is enough for occasional use, quick and clean solution, just remember to backup saved pages. CLI utility You can also use the command-lin … | Continue reading
Create Samba Active Directory server using Debian Bullseye. Preparations Update package index. $ sudo apt update Upgrade operating system. $ sudo apt upgrade Ensure that hostname is defined. $ sudo hostnamectl --static set-hostname ad.octocat.lab Inspect hosts file which should b … | Continue reading
Parse the dnf fastest available mirror data. Inspect fastest available mirror data. $ cat /var/cache/dnf/fastestmirror.cache [:_librepo_:] version=1 [https://centos-stream.koyanet.lv] ts=1649548443 connectime=0.02913 [http://centos-stream.koyanet.lv] ts=1649548443 connectime=0.03 … | Continue reading
Improve dnf download times. Inspect current dnf configuration. $ cat /etc/dnf/dnf.conf [main] gpgcheck=1 installonly_limit=3 clean_requirements_on_remove=True best=True skip_if_unavailable=False Increase the number of simultaneous downloads from default 3 to 10 (up to 20). $ echo … | Continue reading
Fix failed dynamic DNS update with Samba Active Directory and System Security Services Daemon by upgrading internal Samba DNS to BIND. Issue DNS records are updated correctly, but dynamic DNS update process is marked as failed. $ dig s1.example.org +short 172.16.0.117 Sample sssd … | Continue reading
Determine fastest APT server using the Internet Control Message Protocol (ICMP). Install netselect-apt utility. $ sudo apt install netselect netselect-apt Display usage information. $ netselect --help Usage: netselect-apt [OPTIONS] [ debian_release ] debian_release is one of stab … | Continue reading
Take advantage of Docker to install Mastodon This article is based on the official docker compose which can be found the in mastodon project repository. Operating system. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: … | Continue reading
Install Ubuntu Release Upgrader on an older system. Connect to an older Ubuntu instance. $ ssh example.org -l mgmt mgmt@example.org's password: Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0 x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonica … | Continue reading
Fix pkeys are immutable on OpenSSL error inside Vagrant on Ubuntu Jammy Jellyfish. Operating system. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy Perform a vagrant operation to raise an error. $ … | Continue reading
Enumerate power sources and display battery status using UPower a System-wide Power Management daemon. Display help information. $ upower --help Usage: upower [OPTION?] UPower tool Help Options: -h, --help Show help options Application Options: -e, --enumerate Enumerate objects p … | Continue reading
Check System Security Services Daemon configuration. Use sssctl utility from sssd-tools package to inspect sssd configuration. $ sudo sssctl config-check Issues identified by validators: 0 Messages generated during configuration merging: 0 Used configuration snippet files: 0 Exit … | Continue reading
Configure System Security Services Daemon to disable SUDO Smart Refresh task. SUDO Smart Refresh task is executed periodically even if it is not used or configured. [...] (2021-09-22 22:10:24): [be[example.org]] [be_ptask_execute] (0x0400): Task [SUDO Smart Refresh]: executing ta … | Continue reading
Brief note about Samsung SSD T7 on Raspberry Pi 4 which provided a nice boost to my personal GitLab instance at home. The performance is strongly limited due to Raspberry Pi device constraints, but it is still much better than regular HDD. Operating system. $ lsb_release -a No LS … | Continue reading
Identify Raspberry Pi device using built-in leds. Introduction Every Raspberry Pi (3 & 4) device contains two leds. $ find /sys/class/leds/ -maxdepth 1 -follow -type d -name "led[0-9]" /sys/class/leds/led0 /sys/class/leds/led1 The led0 indicates activity on the first memory card, … | Continue reading
Pretty print ping output using prettyping. Clone source code. $ git clone https://github.com/denilsonsa/prettyping Cloning into 'prettyping'... remote: Enumerating objects: 391, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (6/6), done. remot … | Continue reading
Configure System Security Services Daemon (sssd) to update Active Directory DNS using the custom interval. By default, the client IP address in the Active Directory DNS is updated every 24 hours using the IP addresses of the interface associated with the connection to the Active … | Continue reading
Today I have installed Ubuntu Jammy Jellyfish (release 22.04) on Acer Aspire One (A114-32-P991), but the i801 SMBus interrupt storm made this system unusable. Operating system version. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu Jammy … | Continue reading
Improve apt download times by using apt-fast a shell-script wrapper for apt, apt-get or aptitude. At first install debconf utilities. $ sudo apt-get install debconf-utils Preconfigure apt-fast, all configuration options will be mentioned later. $ cat | Continue reading
Upgrade Ubuntu 21.10 LTS (Long Term Support) to the latest development version of Ubuntu 22.04 release. Check operating system version before release upgrade. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 21.10 Release: 21.10 Codename: … | Continue reading
Convert line endings inside text file from DOS to UNIX format. Try to execute shell script in DOS format. $ ./processes_bar_chart.sh bash: ./processes_bar_chart.sh: /bin/sh^M: bad interpreter: No such file or directory Install dos2unix utility. $ sudo apt install dos2unix Display … | Continue reading
A long time ago I have described how to check external IP address, so today I will display remote address using Nginx web server. Use the following virtual host configuration to simply return the remote address in the response body. server { server_name _; location / { default_ty … | Continue reading
Determine mountpoint filesystem type using core stat utility which is expected to exist on every operating system. Determine / mountpoint filesystem type. $ stat -c %T -f / ext2/ext3 Determine /mnt/userdata mountpoint filesystem type. $ stat -c %T -f /mnt/userdata btrfs Determine … | Continue reading
Install n³ a tiny and unobtrusive terminal file manager that will accompany you in your daily tasks. Install nnn using package manager. $ sudo apt install nnn Display usage information. $ nnn --help usage: nnn [OPTIONS] [PATH] The unorthodox terminal file manager. positional args … | Continue reading
Use nethogs utility to display current bandwidth grouped by a process Inspect nethogs package description. $ sudo apt info nethogs Package: nethogs Version: 0.8.5-2+b1 Priority: optional Section: net Source: nethogs (0.8.5-2) Maintainer: Paulo Roberto Alves de Oliveira (aka kretc … | Continue reading
Delay the start of the systemd service at boot. Inspect service that you want to delay at boot. $ sudo systemctl status redis-server ● redis-server.service - Advanced key-value store Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled) Active … | Continue reading
Colorize command output using grc a generic colouriser. Installation Install a generic colouriser for everything. $ sudo apt install grc Usage It can help you with log files, command output, and configuration files. $ sudo grc journalctl --lines 10 --unit kafka -- Journal begins … | Continue reading
Perform basic operations on zip archives. Inspect zip utility. $ apt info zip Package: zip Version: 3.0-12 Priority: optional Section: utils Maintainer: Santiago Vila Installed-Size: 638 kB Depends: libbz2-1.0, libc6 (>= 2.14) Recommends: unzip Homepage: http://www.info-zip.org/Z … | Continue reading
Display Raspberry Pi serial number using standard command-line utilities. Display model using sysfs. $ cat /sys/firmware/devicetree/base/model; echo Raspberry Pi 4 Model B Rev 1.4 Display serial number using sysfs. $ cat /sys/firmware/devicetree/base/serial-number; echo 100000000 … | Continue reading
Use openssl utility to determine cipher used to encrypt the private key. Inspect the private key as the traditional PKCS#8 form provides this information out of the box. $ cat rsa_pkey_enc_pkey.pem -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: AES-256-CBC,06A16 … | Continue reading
Use Docker or Pod Manager multi-stage build to compile Nginx from source code with additional headers-more-nginx-module module using Debian Bullseye image. The idea is quite simple. The first step is to download source code. The second step is use source code regardless of the us … | Continue reading
Install nala a human-friendly apt front-end using the python-apt API. Add a repository, which supports amd64, arm64, and armhf architectures. $ echo "deb [arch=amd64] http://deb.volian.org/volian/ scar main" | sudo tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list Ins … | Continue reading
Display information about NVMe storage device. You cannot display the identification information for NVMe storage device using hdparm utility. $ sudo hdparm -i /dev/nvme0n1 /dev/nvme0n1: HDIO_GET_IDENTITY failed: Inappropriate ioctl for device Self-Monitoring, Analysis and Report … | Continue reading
Inspect ZooKeeper logs and snapshots. Inspect ZooKeeper data directory. $ ls /opt/kafka/zookeeper_data/version-2/ acceptedEpoch log.2000001e0 log.2000001f6 log.20000020c log.200000222 log.200000238 log.20000024e log.200000264 log.20000027a log.200000290 log.2000002a6 log.2000002b … | Continue reading
Debug ZooKeeper SSL connection issues. Ensure that -Djavax.net.debug=ssl option is defined. $ sudo -u zookeeper -i cat zookeeper/conf/zookeeper-env.sh JVMFLAGS="-Djavax.net.debug=ssl" Restart service. $ sudo systemctl restart zookeeper.service Inspect log file to identify an issu … | Continue reading
Share USB device over network using usbip utility. Preliminary notes The following example is based on Ubuntu 21.10 using 5.13.0-27-generic #29-Ubuntu SMP Wed Jan 12 17:36:47 UTC 2022 kernel. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubunt … | Continue reading