• How to configure OpenDKIM on Linux with Postfix and setup bind zonefile


    This guide assumes you have a working Postfix server and want it to sign with DKIM. There are a few things we have to understand to make all of this work though, which require you to be familiar with DNS as well. 1.) Install OpenDKIM apt install opendkim systemctl enable opendkim 2.) Edit /etc/opendkim.conf Syslog yes SyslogSuccess yes Mode&nbs........
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.


    This sometimes happens when trying to install the EFIversion of grub to a device when you are booted into Legacy/MBR mode. It doesn't seem to occur on all machines, but some and seems somewhat BIOS dependent. grub-install --target=x86_64-efi /dev/sda Installing for x86_64-efi platform. grub-install.real: warning: Couldn't find physical volume `(null)'. Some modules may be missing from core image.. grub-install.real: warning: Couldn't find physica........
  • How to kill a docker swarm


    Assign way more replicas than you have of memory on all nodes and watch the Swarm crash which can easily reproduce in a small VMfor testing. root@Deb11Docker01:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAM........
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian


    This seems to happen in many different drivers but it happened more often in newer versions such as 530 vs 525. Then nvidia-modeset goes to 100% There are many reports of this appearing since driver 4.70 and I can confirm I've seen this in various machines. https://forums.de........
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint


    Have you got this error from Apache? [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [error] (28)No space left on device: Cannot create SSLMutex At first glance it appears that you may be out of disk space but the issue is ipc or interprocess communication. This will clear out the ipcs processes so things can work, this often happens during high traffic and may be a sign of DDOS. The command below will fix it, it will list al........
  • Save money on bandwidth by disabling reflective rpc queries in Linux CentOS RHEL Ubuntu Debian


    Even today we see a lot of servers that have different services and ports open for rpc and this creates not only potential inward vulnerabilities but perhaps more common, the abuse of your network resources in reflective rpc queries. To stop this problem, you should disable and remove all services relating to rpc or at least block all relevant ports for the service. Surprisingly, there are still some providers and OS installs in Linux that install these services and leave them........
  • File "/usr/local/lib/python3.5/dist-packages/pip/_internal/utils/entrypoints.py", line 12 f"pip{sys.version_info.major}", ^ SyntaxError: invalid syntax python pip3 error solution


    Is python3-pip pip3 not working anymore? Traceback (most recent call last): File "/usr/bin/pip3", line 11, in sys.exit(main()) File "/usr/local/lib/python3.5/dist-packages/pip/__init__.py", line 11, in main from pip._internal.utils.entrypoints import _wrapper File "/usr/local/lib/python3.5/dist-packages/pip/_interna........
  • REFUSED unexpected RCODE resolving bind/named error


    Are you getting this error when trying to connect to a site/domain/service and then you checked your router/nameserver's logs to see what's wrong? You may see something like this: named[3025898]: REFUSED unexpected RCODE resolving This is not usually an error with named or bind, at least not on your end but NORMALLY this is an issue with the remote nameserver. A lot of times this is a misconfigured remote nameserver. A classi........
  • How To Stop DNSMasq from listening on all IPs/Interfaces and allow only localhost


    Some people find it less than intuitive to do on DNSMasq and by default DNSMasq is available on 0.0.0.0 which could even be your LAN or Public IP. Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp ........
  • Install Grafana on Linux Debian Ubuntu Tutorial Guide


    First we need a few extra packages: apt update apt install -y adduser libfontconfig1 musl sudo wget https://dl.grafana.com/enterprise/release/grafana-enterprise_10.3.1_amd64.deb Install / Enable Grafana dpkg -i grafana-enterprise_10.3.1_amd64.deb dpkg -i grafana-enterprise_10.3.1_amd64.deb (Reading database ... 44309 files and directories currently installed.) Preparin........
  • Linux how to get list of all timezones on system Ubuntu


    find /usr/share/zoneinfo/|sed s#"/usr/share/zoneinfo/"##g|grep "/"|grep -v posix|grep -v ^"Etc/"|grep -v ^right|grep -v ^"SystemV" Africa/Addis_Ababa Africa/Abidjan Africa/Blantyre Africa/Lusaka Africa/Casablanca Africa/Libreville Africa/Asmara Africa/Bujumbura Africa/Dakar Africa/Lagos Africa/Malabo Africa/Harare Africa/Kigali........
  • configure.ac:75: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. solution


    configure.ac:75: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/bin/autoconf failed with exit status: 1 make: *** [/software/pixman/configure] Error 1 make: *** Deleting file `/software/pixman/configure' yum install libtool........
  • /bin/sh: autoreconf: command not found solution


    This means the autoconf package is not installed, so we'll install it: /bin/sh: autoreconf: command not found yum install autoconf On Debian apt install autoconf........
  • How To Upgrade Debian 8,9,10 to Debian 12 Bookworm


    Step 1.) Upgrade to Debian 11 first The process to go to Debian 12 is not as smooth as 11, when trying to upgrade from Debian 10. In fact, it doesn't work directly, so you'll first need to follow this guide to update to Debian 11, reboot and come back here if successful. Step 2.) Update sources.list Update your /etc/apt/sources.list like this: deb http://........
  • Linux dhcp dhclient Mint Redhat Ubuntu Debian How To Use Local Domain DNS Server Instead of ISPs


    If you are running a local DNS server like named/bind and don't want to use the ISPsupplied DNS servers that are announced via a DHCP request (using dhclient) then the solution is simple. The reason should be obvious, but normally running your own DNS server will provide a more reliable, and fast DNS response and you won't have to worry about filtering as much (unless your upstream filters or proxies outgoing DNS requests). Edit /etc/dhcp/dhclient.conf........
  • apache2 httpd apache server will not start [pid 22449:tid 139972160445760] AH00052: child pid 23248 exit signal Aborted (6) solution Mint Debian Ubuntu Redhat


    If you get this error, it is often because you have configured Apache with modules that weren't actually installed. Eg. you try to load the PHPmodule but didn't actually install the apache2 php module, so the server can't start. In general, this error can often be caused by issues with problematic modules and/or Apache being configured for modules that have not actually be installed (eg. libapache2-mod-php) is missing. The above results in this less than obv........
  • How To Setup Python3 in Ubuntu Docker Image for AI Deep Learning


    The issue is that Docker images are stripped down, so many tools and even python3 is missing, so you'll have to build or update the actual image yourself. I assume you have started an image with something like this and that you have the Nvidia Toolkit installed (assuming you are using GPUs). If you're not using nvidia just remove --runtime=nvidia --gpus all. docker run -it --runtime=nvidia --gpus all ubuntu bash These works for most images li........
  • How to Configure NVIDIA GPUs with Docker on Ubuntu: A Comprehensive Guide for AI Deep Learning CUDA Solution


    Welcome to our in-depth guide on configuring NVIDIA GPUs with Docker on Ubuntu. This post is tailored for developers, data scientists, and IT professionals who are looking to leverage the power of NVIDIA's GPU acceleration within Docker containers. Whether you're working on machine lea........
  • Linux Ubuntu Mint how to check nameservers when /etc/resolv.conf disabled solution


    You'll notice that /etc/resolv.conf contains dire warners on most Linux Desktops. # This file is managed by man:systemd-resolved(8). Do not edit. # # This is a dynamic resolv.conf file for connecting local clients to the # internal DNS stub resolver of systemd-resolved. This file lists all # configured search domains. # # Run "resolvectl status" to see details about the uplink DNS servers # currently in use........
  • Linux How To Access Original Contents of Directory Mounted Debian Mint CentOS Redhat Solution


    Let's say you have a directory /mnt/raid which has files and directories inside it, but nothing is mounted to it. Then you mount a block device such as /dev/sdh to /mnt/raid Even though /mnt/raid has files and directories there, you can only see the mounted contents of /mnt/raid. How do we access the original contents? Just do a bind mount of the root filesystem to another location. mkdir /bindmount mount --bind / /b........
  • request_module: runaway loop modprobe binfmt-464c Kernel panic - not syncing: No init found Pid: 1, comm: swapper/0 Not tainted solution


    request_module: runaway loop modprobe binfmt-464c Kernel panic - not syncing: No init found Pid: 1, comm: swapper/0 Not tainted This is usually caused by a mismatch in architecture and happens frequently in development environments. Here is a example of what caused this issue: Your binaries are based on one architecture Your kernel was compiled with another architecture. Why does this happe........
  • python3 error Ubuntu Linux error solution SyntaxError: invalid syntax line 12 pip{sys.version_info.major}


    This sort of thing normally happens your python3 or pip3 has been updated, because you have to in order to use pip, but the newer pip now breaks compatibility with your old python (3.5 in this case). There are a few solutions, the easiest is perhaps to upgrade to a newer OS with a newer distro provided Python 3 or to manually install a newer version of Python/OR use a PPA like deadsnakes that provides newer versions. ........
  • Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Connection reset by peer


    You may have a broken apt configure that calls for snap (which is not installed if you get the error below): apt install coreutils Reading state information... Done E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Connection reset by peer E: Could not read message separator line after handshake from [ ! -f /usr/bin/snap ] || /usr/bin/snap advi........
  • How to install and configure haproxy on Linux Ubuntu Debian


    haproxy is one of the best known and widely used Open Source load balancers out there and a strong competitor to nginx. haproxy is used by many large sites per Wikipedia: HAProxy is used by a number of high-profile websites including GoDaddy, GitHub,........
  • talib/_ta_lib.c:747:10: fatal error: ta-lib/ta_defs.h: No such file or directory


    If you are installing ta-lib for Python and get this error then you can normally solve it by manually getting the ta-lib source files and compiling. tar -zxvf ta-lib-0.4.0-src.tar.gz cd ta-lib;./configure;make;make install Collecting ta-lib Downloading https://files.pythonhosted.org/packages/39/6f/6acaee2eac6afb2cc6a2adcb294080577f9983fbd2726395b9047c4e13ec/TA-Lib-0.4.26.tar.gz (272kB) &nbs........
  • debootstrap how to install Ubuntu, Mint, Debian install


    In this example we install debian 10 with --variant=minbase which gives us a minimal/tiny install. Don't use variant if you want the full size install. mkdir /tmp/deb10files debootstrap --variant=minbase buster /tmp/deb10files/ Did you get an error? debootstrap --variant=minbase buster /home/theuser/VMs/deb10files/ You'll get this error if you make a directory in your home........
  • ModuleNotFoundError: No module named 'pip._internal' solution python


    pip3 install requests Traceback (most recent call last): File "/home/user/.local/bin/pip3", line 7, in from pip._internal.cli.main import main ModuleNotFoundError: No module named 'pip._internal' As a quick and temp fix call the OS installed python and not the user .local/bin installed pip3 /usr/bin/pip3 install requests Collecting requests Cache e........
  • How to find out which package a file belongs to in Debian Mint Ubuntu Linux


    To find which package a file is from just pass it the path to the file in question, whether it's a config file or binary, you'll find your answer (assuming it does belong to a package of course). Just use dpkg -S /path/to/yourfile How To Find Which Package The File Belongs To in Debian Mint Ubuntu Linux eg. dpkg -S /usr/bin/xed xed: /usr/bin/xed dpkg -S /etc/pam.conf libpam-runtime........
  • Loaded: masked (Reason: Unit hostapd.service is masked.) Solution in Linux Debian Mint Ubuntu


    If you are getting this error from systemctl "Loaded: masked (Reason: Unit hostapd.service is masked.)" we need to unmask the service. Solution systemctl unmask hostapd Removed /etc/systemd/system/hostapd.service. It's fixed root@routerOS:/var/log# systemctl start hostapd root@routerOS:/var/log# systemctl status hostapd ● hostapd.service - Access point and authentication server for Wi-Fi and Ethern........
  • Debian Ubuntu Mint How To Change Default Display Manager


    The display manager is more so what controls the main graphical login process after Debian/Mint/Ubuntu boot and controls the graphical login sequence. Once you login, you are then usually passed to an Xorg based Window manager like XFCE, Mate, Ubuntu etc... Popular display managers are mdm, gdm, lightdm etc... and they all basically do the same thing with a different interface/style and some feature differences. In Mint for example the normal default display manager is l........
  • Ubuntu Mint Debian Howto Execute Command / Script / Program Upon Wakeup From Sleep


    Sometimes manual intervention on various Linux system's, including Debian, is required to fix things after waking up from sleep. One persistent issue is the sound system / pulseaudio needing to be reset and not working until you do that after waking up. It's not clear if it's an OS issue itself or the sound driver, but this will fix things. Where do we put scripts or commands that need to be used upon wakeup automatically? /lib/systemd/syst........
  • How To Do Linux Network Bonding Teaming in Mint Debian Ubuntu


    Bonding is an excellent way to get both increased redundancy and throughput. It is similar to the "Network Teaming" feature in Windows. There are a few different modes but we will use mode 6, I think it's the best of both worlds, as it is not just a failover, but it provides round robin, so you will get redundancy and load balancing. So if you have a 1G single port, you will have a combined throughput of 4G at this point. Just bear in mind that the true thr........
  • LXC Containers LXD How to Install and Configure Tutorial Ubuntu Debian Mint


    If you are using mint, delete the preference that stops snap from installing (as it is required for lxc) sudo rm /etc/apt/preferences.d/nosnap.pref 1. Install lxd: sudo apt install lxd Issues install lxd or errors? Click here Debian at this time does not have lxd so you'll need to use snap: sudo apt in........
  • GlusterFS HowTo Tutorial For Distributed Storage in Docker, Kubernetes, LXC, KVM, Proxmox


    This can be used on almost anything, since Gluster is a userspace tool, based on FUSE. This means that all Gluster appears as to any application is just a directory. Applications don't need specific support for Gluster, so long as you can tell the application to use a certain directory for storage. One application can be for redundant and scaled storage, including for within Docker and Kubernetes, LXC, Proxmox, OpenStack, etc or just your image/web/video files or even da........
  • (firefox:9562): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Failed to execute child process "dbus-launch" (No such file or directory) Solution


    (firefox:9562): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Failed to execute child process "dbus-launch" (No such file or directory) ExceptionHandler::GenerateDump cloned child 9743 ExceptionHandler::WaitForContinueSignal waiting for continue signal... ExceptionHandler::SendContinueSignalToChild sent continue signal to child [Parent 9562, Gecko_IOThread] WARNING: pipe error (40): Connection reset by peer: file /build/firefox-EymEXX/fire........
  • Debian Mint Ubuntu Which Package Provides missing top, ps and w Solution


    Install procps and it will install the other packages you need: apt install procps Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libgpm2 libncurses6 libprocps7 lsb-base psmisc Suggested packages: gpm The following NEW packages will be ins........
  • Docker Tutorial HowTo Install Docker, Use and Create Docker Container Images Clustering Swarm Mode Monitoring Service Hosting Provider


    The Best Docker Tutorial for Beginners We quickly explain the basic Docker concepts and show you how to do the most common tasks from starting your first container, to making custom images, a Docker Swarm Cluster Tutorial, docker compose and Docker buildfiles.........
  • How To Create OpenVPN Server for Secure Remote Corporate Access in Linux Debian/Mint/Ubuntu with client public key authentication


    Why choose OpenVPN instead of a firewall appliance? OpenVPN can be a reliable and easy replacement for traditional hardware or just be an additional tool that your company uses so that the firewall can focus on its job rather than acting as a VPNappliance at the same time. When comparing OpenVPN with traditional firewal........
  • HongKong VPS Server, Cloud, Dedicated Server, Co-Location, Datacenter The Best Guide on Hong Kong, China Internet IT/Computing


    In our 2024 VPS Server/Cloud Buyer's Guide, we place the location of your VPS/hosting/server as one of the priorities that is often overlooked. 2024 Update - Datacent........
  • How to install Kubernetes with microk8s and deploy apps on Debian/Mint/Ubuntu Linux


    Kubernetes Easy Beginners Architecture Guide Kubernetes is known as container orchestration and we should start at explaining the container part of it. A Container is what runs the actual application and based on an Image, and are more comparable to something like an LXC Container, Virtuozzo/OpenVZ using the Linux Kernel Namespaces feature. Containers run these images as independent, isolated operating environments under the OS's exist........
  • Cisco Router Password Reset Howto Guide Solution Cannot Login /Unknown Enable Password 2600, 2800, 2900, 3900


    It is common that you may get access to undocumented equipment and need to reset the password. This applies to many Cisco routers whether 2600, 2900, 3900 etc... Cisco's Guide says to hit Ctrl +Pause/Break but if it doesn't work on some devices causing people to say "cisco password reset pause break does not work", you can see Cisco's alternative key combinations here:........
  • Linux can't boot/grub boot loader screen with no options solution


    Usually if you get the grub boot loader and it doesn't show any boot options, it's because grub was not installed correctly and/or the partition that it is supposed to be on has changed or does not exist. It can also happen if you install Linux to one drive, but the boot loader to another by accident, whether EFI or MBR/Legacy mode. You can normally fix your booting/bootloader/MBR/EFI it by chrooting into your root partition: #become root sudo su........
  • Linux how to compile binary with static sharedobjects embedded instead of dynamic to use on multi-distributions and avoid glibc compatiblity issues


    One simple flag to configure will create a makefile that statically links all the shared objects and embeds them instead the binary execute. This means as long as you have the same architecture that things should run. Eg. if you have an old version of Debian with a different version of glibc, then this will solve that problem. ./configure LDFLAGS="-static" To test that it is really statically linked run ldd: ldd src/wget........
  • /bin/sh: msgfmt: not found error solution on Linux Compilation Ubuntu Debian Mint Centos


    If you get this error, you were probably compiling some sort of binary or package and got this error. It is normally solved by installing the "gettext"package. On Debian/Ubuntu just apt-get it: apt-get install gettext After that you should be able to configure and make (compile) properly.........
  • How To Boot, Install and Run Windows 2000 on QEMU-KVM


    Interestingly enough Windows 2000 works fine on QEMU 64-bit but you have to specify Pentium as your CPU otherwise it doesn't complete the install (it will not pass the detecting/setting up devices phase). -vga cirrus is wise because it is supported by Windows 2000 and allows higher resolutions and 24-bit color. -cpu Pentium emulates an old computer and is necessary for install to complete -device rtl8139 is important as this oldschool Realtek 8139 NIC is supported by W........
  • How To Setup a Cisco CME (Cisco Manager Express) Virtual Router under Linux using dynamips and dynagen


    This tutorial will get your router up and running using emulation tools. In this case we'll be getting a Cisco C7206 (C7200 series) VXR router going which also supports SCCP VOIP services. dynamips is the emulator itself and dynagen is the front-end tool that helps us control everything. It is used by tools such as gns3 and eve-ng. Together the two tools (dynamips and dynagen) allow us to create and emulate REAL router........
  • apcupsd how to setup and monitor APC UPS units


    It really seems limited in that it can mainly give you the things you would see on the physical unit such as load etc.. wget https://downloads.sourceforge.net/project/apcupsd/apcupsd%20-%20Stable/3.14.14/apcupsd-3.14.14.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fapcupsd%2Ffiles%2Flatest%2Fdownload&ts=1598115866 tar -zxvf apcupsd-3.14.14.tar.gz cd apcupsd-3.14.14 [root@somebox apcupsd-3.14.14]# ./conf........
  • "This kernel requires the following features not present on the CPU: cmov Unable to boot - please use a kernel appropriate for your CPU.


    You should only get this if you are using a Pentium II or something really old. The problem here is that newer kernels than 2.6 don't have true i386 support even if you tell it to compile as i386. It will still include features like cmov that break older computers from being able to work. Generally for very old computers like above, you need to use a 2.6.x kernel and of course make sure it is i386 and all the binaries are as well. ........
  • CentOS 6 impossible to compile a newer libguestfs


    yum -y install gcc make gperf genisoimage flex bison ncurses ncurses-devel pcre-devel augeas-devel augeas readline-devel checking for cpio... cpio checking for gperf... no configure: error: gperf must be installed configure: error: Package requirements (augeas >= 1.2.0) were not met: Requested 'augeas >= 1.2.0' but version of augeas is 1.0.0 yum remove augeas augeas-libs augeas-devel wget http://downl........
  • How To Get Started on Ubuntu with gpt-2 OpenAI Text Prediction


    apt install software-properties-common add-apt-repository ppa:deadsnakes/ppa apt update apt install python3-pip apt install python3.7 curl gnupg python3.7-dev git ln -s /usr/bin/python3.7 /usr/bin/python3 pip3 install numpy keras_preprocessing curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel........
  • How To Install python 3.4 3.5 and up on Linux with wine - Working Solution


    This is sure simple if you follow the guide but it took a lot of hacking around to make this work on Debian/Ubuntu! Now before you ask why bother running wine and python, the reason is because Python executables are NOT cross-platform. If you run pyinstaller in Linux, that binary will only run on Linux and the same if you do it in Windows. So it is preferable if you have a single environment that you can create Linux and Windows binaries from rather than running 2 separate........
  • using Xvfb on virtual remote ssh server to have X graphical programs work


    The scenario here is that you have some sort of remote headless Linux server but would like to run some programs on them and get graphical access to them. The problem is that the remote server may be an image or VMwithout any virtual GPU and even if so, it is likely without KDE or Gnome, so there's no real way to do this, unless you follow our guide. Install xvfb apt install xvfb Reading package lists... D........
  • named bind errors - DNSKEY: unable to find a DNSKEY which verifies the DNSKEY RRset and also matches a trusted key for '.'


    Mar 22 13:46:14 box named[31767]: validating @0x7f51bc001550: . DNSKEY: unable to find a DNSKEY which verifies the DNSKEY RRset and also matches a trusted key for '.' Mar 22 13:46:14 box named[31767]: validating @0x7f51bc001550: . DNSKEY: please check the 'trusted-keys' for '.' in named.conf. Mar 22 13:46:14 box named[31767]: error (broken trust chain) resolving './NS/IN': 192.36.148.17#53 One possibility is sometimes that your time is ou........
  • Convert and install to LUKS Encrypted Drive Ubuntu 18.04 19.10 Linux Mint and Debian Based Linux


    The reason for doing this is that the installer doesn't seem to work properly for LUKS and the server installer doesn't even support LUKS anymore. When you use the GUI install on Desktop for LUKS it won't boot and will just hang after you enter your password. So the only reliable way is to do it ourselves. 1.) Make a default minimal install of Ubuntu 2.) Have a secondary disk on the server or VM. 3.)........
  • CentOS 8 how to convert to a bootable mdadm RAID software array


    The cool thing here is that we only need 1 drive to make a RAID 10 or RAID 1 array, we just tell the Linux mdadm utility that the other drive is "missing" and we can then add our original drive to the array after booting into our new RAID array. Step#1 Install tools we need yum -y install mdadm rsync Step #2 Create your partitions on the drive that will be our RAID array Here I assume it is /dev........
  • python ModuleNotFoundError: No module named 'bs4' even though you have the module


    In this case I am executing using "python3" but what you find in cases like this can be surprising. The most common issues are that someone has a module for python 2 "pip" and doesn't realize they need "pip3" to install it for python3, but this is not one of those cases. ModuleNotFoundError: No module named 'bs4' OKmaybe we didn't install it for python3? [........
  • how to use ifplugd in Linux to execute a command or script when a NIC cable is unplugged or plugged in


    It is fairly simple to use once you know how to use it. However, the tricky thing is that by default it doesn't seem to be active or listen on any interface on manually specified. How To Install ifplugd First we install ifplugd sudo apt install ifplugd Let's enable it on our desired device(s) vi /etc/default/ifplugd set this line as so:........
  • mpv / mplayer with Radeon / AMD GPU Video Card Driver enable VDPAU GPU Accelerated Video Decoding


    The easiest way to know if your videos are playing with GPU acceleration are to watch the process of xplayer, mpv or whatever you are playing. The CPU usage should be no more than 10% for that process/program if it is using acceleration. Let's manually play with vdpau to make sure it works before we make it permanent: First make sure you have libvdpau installed: sudo apt install vdpau-driver-all If yo........
  • PHP 7.2, Apache and Centos 7 How To Install


    yum install centos-release-scl yum install rh-php72 rh-php72-php rh-php72-php-mysqlnd Symlink PHP binary: ln -s /opt/rh/rh-php72/root/usr/bin/php /usr/bin/php Symlink Apache and PHP module config: ln -s /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php72-php.conf /etc/httpd/conf.d/ ln -s /opt/rh/httpd24/root/etc/httpd/conf.modules.d/15-rh-php........
  • Linux Ubuntu Debian Centos How To Make a Bootable Windows 7, 8, 10, 2016, 2019 Server USB from ISO


    Use fdisk on your USB drive to create a bootable NTFS partition (in my case /dev/sdb): sudo fdisk /dev/sdb Welcome to fdisk (util-linux 2.27.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free)........
  • How To Restore Windows MBR Bootsector from Linux using syslinux


    There are many ways but a favorite way is to boot any Linux LiveCD and to use the syslinux package like so: Just change the "sdx" to your sd for example /dev/sda or whatever the drive is that is supposed to boot Windows. sudo dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sdx 0+1 records in 0+1 records out 440 bytes copied, 0.0197808 s, 22.2 kB/s........
  • Cannot Print PDF Solution and Howto Resize


    If you can print other PDFs but not a particular one it is very likely that the PDF size is A4 (the longer, skinnier Asian paper size) instead of the North American letter size ( 8.5" x 11"). This breaks printing in most cases. Or it may print if you find a program that ignores the size issue. Here is an example of an A4 being rejected by a printer in Ubuntu Linux via CUPS Cannot print PDF CUPS Samsung C460: Processin........
  • Apache Cannot Start Listening Already on 0.0.0.0


    A lot of times busy servers will have this issue and you cannot even force kill -9 the apachectl or httpd process: [root@apachebox stats]# ps aux|grep httpd root 1547 0.0 0.2 495452 32396 ? Ds Sep08 3:23 /usr/sbin/httpd root 3543 0.0 0.0 6448 724 pts/1 S+ 13:11&nbs........
  • CentOS 6 and 7 / RHEL Persistent DHCP Solution


    It is very silly but the default on the ifup-eth script tells dhclient ( the program that obtains a DHCP IPaddress if you have selected DHCPin your ifcfg-eth* config file) to EXIT / QUIT if the first attempt to obtain a lease fails. No amount of dhclient.conf settings will fix this because if dhclient is started with -1 (which it is by default)then dhclient will quit. This is obviously very bad for MOST cases. Say for example you have a power outage or........
  • Debian Ubuntu Mint rc-local service startup error solution rc-local.service: Failed at step EXEC spawning /etc/rc.local: Exec format error


    Oct 18 11:06:46 server systemd[529]: rc-local.service: Failed at step EXEC spawning /etc/rc.local: Exec format error Oct 18 11:06:46 server systemd[1]: rc-local.service: Control process exited, code=exited status=203 Oct 18 11:06:46 server systemd[1]: Failed to start /etc/rc.local Compatibility. Oct 18 11:06:46 server systemd[1]: rc-local.service: Unit entered failed state. Oct 18 11:06:46 server systemd[1]: rc-local.service: Failed with result 'exit-code'.........
  • bash script kill whois or other command that is running for too long


    Adjust to suit your needs. Currently this would kill any whois process running for more than 30 seconds or more than 1 minute. Add it as a cronjob. The motivation is that some commands have no timeout and just end up using up CPU and memory for no reason while never exiting to free resources. #!/bin/bash IFS=$(echo -en "nb") for pid in `ps aux|grep whois`; do echo "pid=::$pid::&qu........
  • Linux tftp listens on all interfaces and IPs by DEFAULT Security Risk Hole Solution


    Just edit your tftp file for xinetd like this: *Change the IPto be the IPof the interface you want to listen on. To test if your tftp is available on a certain IP range use nc -u yourip 69 to see if you can still connect (/var/log/messages or /var/log/syslog) should show the connection if it is open. Oct 13 23:20:34 01 xinetd[26631]: Started working: 1 available servic........
  • python import docx error


    sudo pip3 install python-docx [sudo] password for : Downloading/unpacking python-docx Downloading python-docx-0.8.10.tar.gz (5.5MB): 5.5MB downloaded Running setup.py (path:/tmp/pip_build_root/python-docx/setup.py) egg_info for package python-docx no previously-included directories found matching 'docs/.build' warning: no previously-included files matching '.DS_Store' foun........
  • Linux Ubuntu Debian Missing privilege separation directory: /var/run/sshd


    service sshd status ● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: failed (Result: start-limit-hit) since Wed 2019-10-02 11:07:54 EDT; 36s ago Process: 476 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255) Oct 02 11:07:54 box systemd[1]: Failed to start OpenBSD Secure Shell server. Oct 02 11:07:54 box sys........
  • Debian Ubuntu and Linux Mint Broken Kernel After Date - New Extra Module Naming Convention


    I don't consider a lot of these "extra" kernel modules "nice to have" as they often contain drivers for essential items like your soundcard, your NIC and many other devices that may not work. Sometimes you may find that "sound" or "ethernet" worked before a kernel/OS upgrade and now in the new version they don't. Often it will be because you need to install the "extra" kernel modules. One other weird thing is that sometimes........
  • python 3 pip cannot install mysql module


    python3 testserver.com-car-scraping.py html.txt Traceback (most recent call last): File "testserver.com-car-scraping.py", line 5, in import mysql.connector ImportError: No module named 'mysql' For some reason it won't install properly even though I have the mysql client on this machine installed too. Solution: You need the mys........
  • Bind / named not responding to queries solution


    By default bind will not respond to outside queries for security reasons. In most distributions you will find the default in /etc/named.conf looks like this at the top under options: listen-on port 53 { 127.0.0.1; }; listen-on-v6 port 53 { ::1; }; directory "/var/named";........
  • Cisco Unified Communications Manager / CUCM IP 8.6,10,12 Install Error Solution


    Install Errors on Version 12: This error happened on QEMU emulator version 2.11.1 pve-qemu-kvm_2.11.1-5 on Proxmox/Debian but installing on QEMU.12 on Centos 6 did not produce the error. *Update it is not related to the OS or QEMU version. This happened in Centos 6 too after a second install. What really causes this even though you successfully install........
  • Ubuntu Debian Mint Linux SSHD OpenSSH Server Not Starting After Reboot Solution


    If you get error messages like this it is usually because /var/run/sshd does not exist. root@userbox:/# service sshd status ● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab Active: failed (Result: start-limit-hit) since Wed 2019-04-10 02:24:44 EDT; 1 Process: 511 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255)........
  • bind / named how to make a wildcard record and retain defined A records


    It is almost as intuitive as we would like it is just a *. So literally: *INA 127.0.0.1 Complete working bind zonefile below: $TTL 86400 @ IN SOA ns.rtt.ca. ns2.rtt.ca. ( 1247605715; Serial &n........
  • Cisco Unified Communications Manager 12 Install Errors on Proxmox/KVM


    The strange thing is that usually the first install or two will work on any new machine but then it suddenly won't. I had this experience on QEMU 2.13 on a different machine. There is something finicky or buggy about the CUCM installer even when choosing the same virtual hardware specs. qemu-kvm command: /usr/libexec/qemu-kvm -version QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2-2.506.el6_10.1), Copyright (c) 2003-2008 Fabrice Bellard ........
  • QEMU-KVM Windows and Server Guest Installs Mouse Tracking Pointer Location Solution


    You may have noticed if you are running QEMU/KVMmanually that in Windows the the position of the physical mouse does not match where the mouse is positioned within Windows. There is an easy command to pass to qemu-kvm or qemu-system (whatever you call your binary): -usbdevice tablet The above flag will fix your mouse pointing problems whether you are running Windows 95, 98, NT, XP 2000, 2003, Vista, 7, 8 10 or Server 2000, 2003, 2008, 2012, 2016 or 2........
  • chroot in Linux Howto Simple and Easy Guide


    chroot which stands for change root allows you to virtually operate in another operating system even though you haven't booted it. It is commonly used to deploy new distros, applications and to fix a broken Linux/Unix install or prep a new system image without having to physically boot the drive or disk. So in this example let's say we have a drive that has a Linux OS installed on /dev/sdb1 and we have mounted this partition on /mnt/sdb1 The key point is to edit the &quo........
  • qemu-kvm qemu-system Image format was not specified for '/mnt/space/cucm12.img' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'ra


    WARNING: Image format was not specified for '/mnt/space/cucm12.img' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. #you should manually specify the format q........
  • Debian / Mint / Ubuntu net-tools packages provides netstat, ifconfig, route, arp and other classic network admin tools


    The net-tools command brings back all of the oldschool tools that we're used to: /bin/netstat /sbin/ifconfig /sbin/ipmaddr /sbin/iptunnel /sbin/mii-tool /sbin/nameif /sbin/plipconfig /sbin/rarp........
  • Linux bash prompt why does it not show username@host and the current directory?


    Perhaps you've just seen this in the bash prompt: -bash-4.1# Instead of the expected user@hostname# It is probably because you are missing .bash_profile or .bashrc in your home directory Check for yourself: ls -al ~/|grep -E ".bash_profile|.bashrc" -rw-r--r--. 1 root root&nbs........
  • SSH persistent and automatic login script for proxy


    #!/bin/bash sshcommand="ssh -N -R 20000:localhost:22 user@8.8.8.8" result=`ps aux|grep $sshcommand"|grep -v grep` if [ -z "$result" ]; then echo "we are going to connect" $sshcommand else echo "we are already connected" fi This is a handy script you can use and then add it to cron. Save........
  • How To Use Letsencrypt SSL/TLS Encryption to Create Certificates without installing on the target machine


    For some reason, perhaps you don't want to run a daemon or let Letsencrypt have access to your production server. There is a way to use it like a normal CSR/CA setup in manual mode. ./letsencrypt-auto certonly --manual -d realtechtalk.com - www.realtechtalk.com   Eventually you will get prompted to create a certain path and file with certain data: Create a file containing just this data: Casdfasfadsfsad........
  • How To Boot Cisco CUCM UCSInstall 8.6, 10, 11 and 12 on KVM/Proxmox


    The key thing is that you must use a "machine"id of "pc-1.3" or it will say your hardware is not supported. Additionally you MUST use a virtio disk or you will get a ks_pre.sh error as soon as the install starts (a look at logs will show it can't find a disk). This is funny because even though the OS finds the disk and an fdisk -l shows it, it looks like the script looks for a /dev/vda device (virtio) and nothing else, so if you didn't use Virtio as you........
  • VBOX VirtualBox How To Import Raw .img Disk File


    What you need to do if you have taken a dd or real raw image dump of a hard disk: VBoxManage convertdd windows2019-eval-template.img windows2019.vdi --format VDI The .img is the raw dd dump and the .vdi is the output file. --format VDIspecifies to output to .vdi format If you are in a pinch you can always use qemu-kvm binary and manually specify the .img as your disk and i........
  • LUKS Hard Drive Encryption on Linux Mint Ubuntu Debian etc how to mount encrypted hard drive


    The key thing here is to know the actual partition that is encrypted. Often in Linux Mint's installer that ends up being partition 5 or /dev/sda5 sudo cryptsetup luksOpen /dev/sda5 anynamehere You will then be prompted for your irrecoverable passphrase: Enter passphrase for /dev/sda5: If all goes well it won't say anything further. If it says ""No key available with this passphr........
  • Linux Mint 18.2 Create Config File To Start Application Upon Login


    This is not about systemd/systemctl and not about "onboot" so there's no rc.local trick here but it's the GUI/Gnome etc when a user logs in that a command is launched. Put this in your home dir The .config/autostart directory is where Linux Mint/Ubuntu checks for autostart application config files mkdir -p ~/.config/autostart Create a new entry/file that starts an application........
  • SSH error cannot Forward or Listen "bind: Cannot assign requested address"


    debug1: Local connections to LOCALHOST:18006 forwarded to remote address 192.168.1.93:8006 debug1: Local forwarding listening on 127.0.0.1 port 18006. debug1: channel 0: new [port listener] debug1: Local forwarding listening on ::1 port 18006. bind: Cannot assign requested address What we are seeing is that we can't listen on an IPV6 address of ::1. We need to tell SSH to stop using IPV6 so we'll edit ssh_config to take care of this issue........
  • bind named error solutions named[2169]: error (no valid DS) resolving / error (broken trust chain) resolving / : error (no valid RRSIG) resolving 'com/DS/IN':


    Below are the common errors you'll get with named AKA bind if your time is incorrect. The simplest solution is to install and run ntpd to correct your system's time (install ntpd if it is not installed) systemctl start ntpd systemctl enable ntpd Dec 20 13:36:16 hostingbox named[2169]: error (no valid DS) resolving 'develop.waxrain.com/A/IN': 14.215.150.17#53........
  • DRBD Errors Caused By Physical Corruption


    In a RAID array I had a have periodically lost a drive here and there over the past several months. Iwas always able to readd and resync without losing data. However at some point it looks like some minor corruption happened and this makes DRBD unhappy. Using fsck did not help either. Dec 19 06:01:45 storageboxtest4 kernel: [19005.945890] EXT3-fs error (device drbd0): ext3_get_inode_loc: unable to read inode block - inode=22184379........
  • Linux named / bind how to dump, view and clear the cache!


    Do you hate it when your ISPhas old cached records because of a high TTLon the DNS record of the relevant domain? In plain English this means you often can't connect to a site or service because your ISP's DNS servers haven't gotten word of the new IP address (probably because they haven't checked). There are also some that are notorious for ignoring TTL and not updating records for days! But if you are lucky and smart enough to have your own Linux based DNS se........
  • Why SMART is not smart at all and doesn't properly predict disk errors that cause a kernel panic or crash


    Before getting into the output here is my typical experience with SMART, there is what I call a "bad disk" with pending and uncorrectable sectors that cannot be reallocated. It has caused a kernel panic and system crash repeatedly as we can see from the logs. But SMART says it has "PASSED" its self assessment. SMART is still useful to me but it is more about looking at Current_Pending_Sector. Any time I have had anything but 0 for that attribute it........
  • iSCSI on Centos 7 Configuration and Setup Guide for Initiator and Target


    initiator = client target = server These are the first concepts you should understand which is that in iscsi essentially the "initiator" is the client and the "target" is the server. iSCSI is derived from the old fashioned SCSI that us oldtimers grew to love. The "i" stands for Internet and the SCSI stands for "Small Computers Systems Interface" (SCSI). iSCSI Target (Server)Setup targetcli is the pac........
  • How Does Cisco CUCM (Cisco Unified Communication Manager) Work?


    Cisco's CUCM (Cisco Unified Communication Manager) is a system that combines voice, video, data and mobile products into a single unified management suite. At its core, the CUCMis like a "Super PBX" that controls the flow of all communications through an organization even single or multiple site deployments. Cisco's CUCMmakes communication more effective and simple through centralized management and unification of communications resources.........
  • MySQL Using mytop Debug Source of High IO and Slow Performance


    mytop is one of my favorite tools and it is fairly simple aside from a few caveats and issues that persist to this day. To install it on Centos: yum -y install centos Configure ~/.mytop vi ~/.mytop user=root host=localhost db=test #port=3306 socket=/var/lib/mysql/mysql.sock header=1 color=1 Try runni........
  • How To Mathematically Convert and Calculate Binary Value To Decimal Value


    When converting binary the easiest way is to write out a vertical list in a format like below and follow the formula in the table. Example Convert 1101 1111 to decimal. Step 1.) Write out the binary below in vertical form (leave lots of space on the left side). Keep this in mind that the "previous sum" starts at 0 on your first line. Step 2.) Formula: 2 *........
  • systemd management using systemctl and journalctl to check systemd logs


    systemd is like the service manager for your Centos and other modern Linux distributions (including Debian/Mint/Ubuntu) allows you to enable services, stop them, restart them, check their status and even reboot your system. The key commands or arguments you will use with systemctl are the following: Unit Commands: list-units [PATTERN...] List loaded units &nbs........
  • HP DL385 G7 Linux BIOS Update Flash


    wget https://downloads.linux.hpe.com/repo/spp/rhel/6/x86_64/current/CP017004.scexe --2018-08-16 05:11:16-- https://downloads.linux.hpe.com/repo/spp/rhel/6/x86_64/current/CP017004.scexe Resolving downloads.linux.hpe.com (downloads.linux.hpe.com)... 15.249.152.85 Connecting to downloads.linux.hpe.com (downloads.linux.hpe.com)|15.249.152.85|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1525561 (1.5........
  • gvfs mount in /run/user cannot be accessed or displayed wrong permissions Error: Location is already mounted


    You get errors like below and see you have all question marks for the permissions if you go to /run/user/1000/gvfs If you try to access the mounted share such as anything mounted as gvfs like an SSH share in your file manager you may get an error like this. It generally means an interruption in communication or a fault with gvfsd has caused it. Solutio........
  • Linux bash shell doesn't show username, hostname or current path fix solution


    Usually this is because when you created your user you added a user but didn't create their home directory and/or for some reason your .bashrc and .bash_profile in ~ (home) is broken/missing. In your home just create the following files with the following content to solve it: .bashrc and .bash_profile. To apply it just relogin/start a new bash session # .bash_profile # Get the aliases and funct........
  • VMWare Vsphere VCSA Graphical Install Creates json


    yes it does create its own json ============================================ cat /tmp/vcsaUiInstaller/ovftool-20180809-175238948-20180809-175603497.log |grep -i json 2018-08-09T17:56:04.238-07:00 verbose OVFTool[30966] [Originator@6876 sub=Default] Manifest file entry: SHA1(VMware-vCenter-Server-Appliance-6.7.0.12000-8832884_OVF10-file1.json) = 1deb658c724767697587d5909c4051c01813e6a1 --> ........
  • Debian Mint Ubuntu compiling xmr-stak


    sudo apt-get install libcurl4-openssl-dev git build-essential autotools-dev autoconf libcurl3 sudo apt-get install libcurl4-gnutls-dev git clone https://github.com/wolf9466/cpuminer-multi sudo apt-get install cmake libpthread-* libmicrohttpd-dev libssl-dev libhwloc-dev git clone https://github.com/fireice-uk/xmr-stak-cpu.git make install cd bin chmod +x xmr-stak-cpu ./xmr-stak -O xmr........
  • Centos 7 - How To Install NFS and Mount Remotely


    Server Side Config 1.) First install nfs-utils yum -y install nfs-utils 2.) Configure nfs share Create a directory for your NFS share mkdir /datastore Create your NFS share in /etc/exports echo "/datastore 10.220.101.0/24(rw,sync,no_root_squash)" >> /etc/exports systemctl restart nfs........
  • Postfix How To Change Sending IP Address To Specific IP Binding or Interface


    Ithought I'd post this becuase there is some bad information out there. Some guides tell you to edit /etc/postfix/master.cf (-o smtp_bind_address=) but this doesn't work. The same guide also says if you don't change it there you end up changing the listening IP/bind interface which is also not true. Here is a simple and effective way to change Postfix's sending/binding/outgoing IP address (very important for reverse DNS and so mail servers don't block you)........
  • VSphere InternalServerError - Error When Adding Permissions


    InternalServerError (com.vmware.vapi.std.errors.internal_server_error) => { messages = [LocalizableMessage (com.vmware.vapi.std.localizable_message) => { id = vapi.bindings.method.impl.unexpected, defaultMessage = Provider method implementation threw unexpected exception: com.vmware.vapi.std.errors.InternalServerError, args = [com.vmware.vapi.std.errors.InternalServerError] }], data = } I was getting the........
  • NFS Share Won't Mount Solution - mount: wrong fs type, bad option, bad superblock on 10.10.2.20:/tmp/nfsmount


    nfs mount failed: mount 10.10.2.20:/tmp/nfsmount /mnt/nfs/ mount: wrong fs type, bad option, bad superblock on 10.10.2.20:/tmp/nfsmount, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program)  ........
  • VMWare 6.7 VCSA VSphere ESXi Management SSO Install Guide on Linux using the CLI


    #mount the VCSA DVD mount /dev/sr0 /mnt/cd #alternatively you could mount the iso directly mount -o loop vcsa.iso /your/mount/path #for this purpose we are using the CLI installer on Linux cd /mnt/cd/vcsa-cli-installer/lin64 #no it's not going to be that easy you can't just run vcsa-deploy like that you need to use a template or configured .json file ./vcsa-deploy Usage: vcsa-deploy [-h] [--version] [--supported-deploymen........
  • OpenVPN error ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)


    This basically means that you are running as non-root and you need to be root to create the tun0 or tap0 device on OpenVPN. You could try sudo or adding the openvpn binary to the list of sudoers.........
  • not allowed to execute '/usr/bin/apt-get install eclipse' as root linux sudo user permisson issue and solution


    This is most likely to happen on a normal GUI system like Ubuntu or Linux Mint. If you or the user is meant to have sudo / root privileges it is as simple as editing the following files: Now assume your username is "iamtheuser" vi /etc/group adm:x:4:syslog,iamtheuser sudo:x:27:anotheruser,iamtheuser Find the above lines and add a comma and "ia........
  • named [FAILED] - zone 1.168.192.in-addr.arpa/IN: not loaded due to errors. - bind error solution


    Centos when copying old files and restarting it seems load everything fine and then says [FAILED] with no log or other message. service restart named named [FAILED] Check more thoroughly you may have missed the error if you have lots of zones! service named restart|grep error zone 1.168.192.in-addr.arpa/IN: not loaded due to errors. zone 2.168.192.in-addr.arpa/IN: no........
  • OpenVPN cannot ping remote IP routing loop issue after connecting


    Sometimes if you have a very basic configuration OpenVPN on the client side for some reason sends all traffic to the OpenVPN server IP through the tun0 which is of course impossible and creates a block or routing loop. This is because you need to use your normal ISP/LANgateway to hit the OpenVPN server if it is remote/offsite as is usually the case. So if you are connected to the OpenVPN through say a tun0 device and your routing is set to connect to the OpenVPN&nbs........
  • Linux Mint Black Screen after boot no graphics solution


    This is not the normal "black screen"issue and I was shocked to eventually find out why. The normal advice of reconfiguring Xorg didn't work. Even booting into "Recovery Mode" did not help. Here is the short end of the stick that fixed it: sudo apt-get install mdm mate-desktop-environment Yes you got it right, mdm and the mate-desktop-environment / gnome were somehow uninstalled. This must be whe........
  • Linux Mint Ubuntu Debian How To Disable Webcam Automatically Onboot To Prevent Spying and Privacy Violations


    It is well known hackers, the NSA, CIA and other groups have created malware to secretly turn on your webcam and microphone on your phone, tv etc.. But fortunately on our computers and laptops we have some options. Most webcams use the "uvcvideo" kernel module / driver. You can disable this in two ways on boot. I recommend both just as a failsafe. Disable it on rc.local once your system boots automatically Add the followi........
  • Apache htaccess Custom ErrorDocument not working properly for root home page 403 Error Issue and Solution


    So I have a domain "testdomain.com". Inside test domain.com's root is the following .htaccess: Options +FollowSymLinks -Indexes ErrorDocument 403 /launch/index.html Order Deny,Allow Deny From All Allow From 192.168.1.2 When you visit anything other than root things work fine. Eg. if you visit http://testdomain.com/somedirfile.html It will show the right error in /launch/........
  • samba how to listen on specific IP only


    This is useful for security purposes especially on a server which may have a public IP assigned to it but has a second NIC for the LAN. Here is how you edit smb.conf: [global] interfaces = 192.168.1.50 bind interfaces only = yes As you can see above it will only listen on 192.168.1.50 and remind to keep the "bind interfaces only"option.........
  • Installing SSL Certificate with Chain Intermediary CA File


    Some of the cheaper or newer SSL suppliers will require this to work properly (otherwise you may be prompted that the cert is invalid when it's not the case but it will certainly scare off your users!). In the Apache vhost conf for the domain here is what you add: SSLCACertificateFile /path/to/your/cafile.pem Here is a full example of an SSL Vhost config in Apache using a CA Certificate file ........
  • How to start screen in bash script or from /etc/rc.local on startup as a specific user


    It takes some tinkering the main thing is that the "-dmS" flag allows screen to start without a session which of course sudo won't have. solution: /usr/bin/sudo -u user /usr/bin/screen -dmS nameyouchoose /script/start.bash this doesn't work at all: /usr/bin/sudo -u user "/usr/bin/screen /script/s........
  • Debian Mint Ubuntu Linux Server Password Forgotten Reset Password Solution Centos 7 8 Root Password Reset Recovery


    This guide will work for most modern Linux versions like Centos RHEL 7, Debian, Mint, Ubuntu etc... In Centos 7 the days of editing the "kernel"line and adding "single"are gone. On top of that sometimes after a new install passwords do not work, maybe you forgot your password or for some other reason you need to break in or fix your system? It could also be because you can't mount your root / or some other /etc/fstab error and many other err........
  • MySQL Cannot Update/Write to any database table solution


    This happened on Centos for no apparent reason with no obvious issue in the logs. Data could be read fine but not written (possibly due to some corruption or out of memory issue in the OpenVZ container is the best guess). All mysql update and insert queries failed freezing without any error log on any database and table. Tried to restart: service mysqld restart Timeout error occurred trying to stop MySQL........
  • GCC 5 on Centos 6 - How To Install


    Install requirements: yum -y install gmp-devel mpfr-devel libmpc-devel glibc-devel glibc-devel.i686 zip unzip jar Download, untar, configure, compile and install GCC http://mirrors.kernel.org/gnu/gcc/gcc-5.5.0/gcc-5.5.0.tar.gz tar -zxvf gcc-5.5.0.tar.gz cd gcc-5.5.0 ./configure make make install Now you need to cleanup th........
  • How To Secure Samba NMBD/SMBD to bind to a specific IP address


    By default Samba SMB/NMB listen on ANY and ALLIPs on your system by binding to 0.0.0.0. Obviously this is a huge security risk if you have a public facing server with both internal and external access. Usually when a system administrator sets up a samba server their intention is just to share with a LAN. To do this you need to the following options under the [global] section in smb.conf bind interfaces only = yes interfaces = 192........
  • M2Crypto.SSL.Checker.WrongHost: Peer certificate subjectAltName does not match host, expected fedora-archive.ip-connect.vn.ua, got DNS:mirror.ip-connect.vn.ua


    You are using Centos 5 which is deprecated so nothing in yum will work until you follow this post to use the vault: http://realtechtalk.com/Centos_59_Working_Vault_Repo_file-1921-articles yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * epel: fedora-archive.ip-connect.vn.ua Traceback........
  • [Wed Sep 20 15:34:44 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Sep 20 15:34:44 2017] [error] Init: Unable to read server certificate from file /www/ssl-certs/server.crt [Wed Sep 20 15:34:44 2017] [error] SSL Library Err


    [Wed Sep 20 15:34:44 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Sep 20 15:34:44 2017] [error] Init: Unable to read server certificate from file /www/ssl-certs/server.crt [Wed Sep 20 15:34:44 2017] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag [Wed Sep 20 15:34:44 2017] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error........
  • /usr/bin/supermin-helper exited with error status 1. To see full error messages you may need to enable debugging. See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs at /usr/bin/virt-list-partitions line 177.


    virt-list-partitions kvmusertest.img /usr/bin/supermin-helper exited with error status 1. To see full error messages you may need to enable debugging. See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs at /usr/bin/virt-list-partitions line 177. #solution update-guestfs-appliance........
  • Linux Mint/Ubuntu/Debian apt how to downgrade a package


    First of all check to see which version if any you have available for a downgrade: apt-cache showpkg packagename Downgrade/Install old package: apt-get install package=version Example apt-cache showpkg caja Package: caja Versions: 1.10.3-1+rafaela (/var/lib/apt/lists/packages.linuxmint.com_dists_rafaela_import_binary-amd64_Packages) (/var/........
  • kdenlive titles/text renders as white screen when using .sh script


    When using the .sh script the rendering doesn't work after an upgrade of related packages to kdenlive. kdenlive (kdenlive:amd64 (4:17.04.1+git201705191233~ubuntu16.04.1)) with affine or composite transitions was fine but is now broken during the time of transition it is just a white screen. The previous version was fine: kdenlive:amd64 (4:17.04.1+git201705191233~ubuntu16.04.1 But now I can't find it or install it:........
  • [1035724.274610] [drm:intel_pipe_update_end [i915_bpo]] *ERROR* Atomic update failure on pipe A (start=62076478 end=62076479) time 102 us, min 894, max 899, scanline start 893, end 900 W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1.bin


    [1035724.274610] [drm:intel_pipe_update_end [i915_bpo]] *ERROR* Atomic update failure on pipe A (start=62076478 end=62076479) time 102 us, min 894, max 899, scanline start 893, end 900 W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1.bin for module i915_bpo I've been getting those errors on a J3455 NUC box with the latest kernel on Linux Mint 18.2. When updating the initramfs I also got the error about the firmware........
  • /usr/bin/ld: cannot find -lboost_system-mt-s /usr/bin/ld: cannot find -lboost_filesystem-mt-s /usr/bin/ld: cannot find -lboost_program_options-mt-s /usr/bin/ld: cannot find -lboost_thread-mt-s collect2: error: ld returned 1 exit status make: *** [cag


    cagecoin linux compile: sudo apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libminiupnpc-dev Solution: sed -i s/"BOOST_LIB_SUFFIX=-mt-s"/"#BOOST_LIB_SU........
  • Wine uninstalled broken on Linux Mint


    Solution: Aptitude is very smart and fixed the issues it was because of nvidia cuda and opencl and nothing else suggested or hinted this using apt sudo aptitude install wine The following NEW packages will be installed: ocl-icd-libopencl1{ab} ocl-icd-libopencl1:i386{ab} wine wine1.6 wine1.6-amd64{a} wine1.6-i386:i386{a} The following packages will be REMOVED:........
  • ffmpeg Linux Mint download, compile and install howto


    #if you have nvidia make sure you install the nvidia-cuda-toolkit so hardware acceleration can be used wget http://ffmpeg.org/releases/ffmpeg-3.3.2.tar.bz2 tar -jxvf ffmpeg-3.3.2.tar.bz2 cd ffmpeg-3.3.2/ ./configure --disable-yasm install prefix /usr/local source path ........
  • Migrate Centos 7 from Single HDD to mdadm RAID 10 array:


    Done on Centos 7.3 very important as clearly based on older guides it was a lot easier and more simpler! Hint do not use grub2-install! If you have trouble booting after this check this CentOS mdadm RAID booting/fixing guide. One huge caveat if you are an oldschool user or sysadmin who has avoided UEFIbooting The nor........
  • Centos 7 Cudaminer Nvidia setup guide


    I am using a GTX 1060 but replace the download for the driver with the correct/current version for your particular card by visiting: http://www.nvidia.com/Download/index.aspx?lang=en-us yum install automake curl openssl-devel libcurl-devel gcc gcc-c++ yum -y install kernel-devel-`uname -r` yum -y install unzip #the........
  • rsync run as root sudo without password


    This is a common issue, what if a issue shouldn't have root but you want to use that user to make a full backup of a system? They of course need root access. You can actually just give them passwordless sudo access to rsync in /etc/sudoers: sudo vi /etc/sudoers yourusername ALL = NOPASSWD: /usr/bin/rsync Here is how you would execute rsync: The key thing for the remote host is to........
  • cudaminer freezes Linux Mint taints kernel


    When running cudaminer once it tries to initialize the card the entire screen freezes. The computer itself is still running but the Xorg is done for, you cannot even switch to another console window and must reboot (even an mdm or Xorg restart does not help). At first cudaminer will give you these errors: stratrum_recv_line failed ...retry after 15 seconds GPU #0: Geforce 210 with compute ca........
  • mencoder bmovl error vf_bmovl: Unknown command: ''. Ignoring.


    Based on this tutorial: http://www.linuxjournal.com/content/overlay-images-video-using-mplayer-and-mencoder mencoder -oac pcm -ovc raw -vf bmovl=0:0:tfifo -o $output $file vf_bmovl: Unknown command: ''. Ignoring. ........
  • text to speech for Linux


    espeak - is horrible and sounds very old and robotic echo "hello there"|espeak #don't know how to use mbrola and plugins cicero jovie just seems to be a graphical interface to espeak There is also sbreader/sapi Google's Text To Speech Works Quite Well #!/bin/bash say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolec........
  • Linux how to whois query other gTLDs such as .club solution


    whois in Linux is incredibly out of date and does not seem to recognize most new TLDs domains, but there is a quick and easy tip/hack/tweak for this. An example of new TLD's site as .review .site .club whois somesite.club No whois server is known for this kind of object. bash to the rescue Now I did try to apply this in .bashrc but DONOT! Ithink the * wil........
  • How to verify SSL SHA-1 Certificate Fingerprnit Signature of your mail/web server to avoid hijacking/man-in-the-middle attacks


    This is especially helpful if you run your own servers. If you are presented with an error message or warning that the signature has changed or does not match the IP/domain you are connecting to you always want to verify manually. So your e-mail/web client will show you an SHA-1 fingerprint like this: "Could not verify this certificate because the issuer is unkown" or other reasons such as a mismatch in IP/domain. It will also show you........
  • What happens when you unplug 1 or more devices from an mdadm RAID array to simulate a failure in Linux Ubuntu/Centos/Debian?


    In short the two drives in the array were /dev/sdd and /dev/sde. The kernel sees they were unplugged and have gone down as you can see below. mdadm caught the first one being unplugged /dev/sde and disabled the missing drive. However when the final drive that was part of the array is unplugged it didn't notice at all. Instead it complains about an IO error later for drives that the kernel knows do not exist anymore. [45817.162728] ata4: exception........
  • Migrating from Linux Mint 17.2 mdadm RAID array to a new one (because I upgraded to larger drives).


    1.) Replicate the number of partitions in your new drives. gdisk /dev/sda gdisk /dev/sdb I created 3 partitions of the same same size. partition #1: +1G (/boot) partition #2: +60G (swap) partition #3: rest of it (/) #note if you are using GPT/gdisk you need to create separate a partition at least 1MB in size (in my case I would a 4th partition and mark it type ef02).........
  • mdadm frozen and doesn't realize array is dead/missing failed due to unplugged drives


    This was a surprising bug but I unplugged all drives for an array md127. At first it was just 1 drive and mdadm seemed to notice this. I unplugged the second drive taking the array offline but mdadm did not realize it was offline and still showed a non-existent disk as being part of it. This created problems trying to unmount it or even to stop this array with mdadm freezing. As for how to fix it I can only think of making sure you are not in a mounted path of........
  • Centos 5 OpenSSL does not support TLS 1.2 Apache Error


    [Thu Jan 26 14:13:31 2017] [notice] caught SIGTERM, shutting down [Thu Jan 26 14:14:00 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Thu Jan 26 14:14:00 2017] [error] Server certificate is expired: 'Server-Cert' [Thu Jan 26 14:14:00 2017] [notice] SSL FIPS mode disabled [Thu Jan 26 14:14:07 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Thu Jan 26 14:14:07 2017] [error] Server certificate is expired: 'Server-Ce........
  • DRBD Split-brain solution


    Uh oh [17925926.174277] block drbd0: Handshake successful: Agreed network protocol version 96 [17925926.174325] block drbd0: conn( WFConnection -> WFReportParams ) [17925926.174342] block drbd0: Starting asender thread (from drbd0_receiver [1682]) [17925926.174432] block drbd0: data-integrity-alg: [17925926.174581] block drbd0: drbd_sync_handshake: [17925926.174586] block drbd0: self 2AAE66AF9252D6DB:2815BF........
  • ERROR 2013 (HY000): Lost connection to MySQL server during query


    The solution is simple but strange, if you copy your /var/lib/mysql directory to another server and think it will work, be sure to check if you have /var/log/mysql and binary log files. If you do, the server will not work and will give you errors like below and crash without the proper log files. UPDATE user SET password=password("newpass") WHERE user='root'; flush privileges; ERROR 2013 (HY000): Lost connection to MySQL server durin........
  • PayPal Subscription Howto Creation Automatic Payments Manual


    An easy way to pay companies and friends/family since PayPal does not have an option when sending money to make it a subscription: "business" = The e-mail or PayPal ID of the person/organization to pay to. a3 The recurring amount "eg. 115" will be 115 USD p3 The time period (eg. 2) t3 Unit of time period m=monthly,w=weekly,y=yearly item_name = "the note/product service reason you are paying ha........
  • bind/named rndc: connect failed: 127.0.0.1#953: connection refused (solution)


    service named status rndc: connect failed: 127.0.0.1#953: connection refused named (pid 10557) is running... This issue is normally caused by a permissions issue where named doesn't have the permissions to read the rndc.key. Check /var/log/messages: Jan 4 17:06:22 storagebox named[10753]: none:0: open: /etc/rndc.key: permission denied Jan 4 17:06:22 storagebox named[10........
  • Linux Mint 17 How to Enable File Sharing Option in File Manager


    I still cannot understand how this would not be enabled by default and I struggled to find the reason why with manually installing samba etc.. wondering why the option for sharing was not in the menu. On Linux Mint "MATE" the package is called "caja-share" and on Cinnamon it is called "nemo-share" so edit the below command as necessary: *Also note that the "samba" package is necessary as it is not inst........
  • Ubuntu/Debian OpenVZ Template Problems No Networking and SSH not starting


    It all comes down to a bug essentially where you are running an older kernel that doesn't support the newer Debian templates. The solution is to update your OpenVZ kernel. Here are some symptoms of the problem/lack of kernel support: Ubuntu Template 12.04 requires a manual network start: service networking start sshd will not start: /usr/sbin/sshd PRNG is not seeded mknod /dev/random c 1 8........
  • Script runs fine from shell but not from cron job in Linux/Unix Debian/Ubuntu/Mint/Centos


    Usually the cause is inexplicable because some things just don't work correctly even when calling all commands by their full path. Usually adding the following to your crontab file at the top will fix/solve the issue: SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ........
  • Linksys E2500 DD-WRT Upgrade Instructions and Enabling 5ghz with Tomato Firmware


    1.) Flash directly to this file: http://tomato.groov.pl/download/K26RT-N/build5x-132-EN/Linksys%20E-series/tomato-E2500-NVRAM60K-1.28.RT-N5x-MIPSR2-132-Max.zip *I was never able to get the larger "Mega" file to work, at least not initially so I recommend the file above. To enable 5ghz I had to do the "Clear NVRAM" Option before it was shown. 2.) Or if you don't need 5ghz (most devices do not support it and cannot........
  • Linux Mint/Ubuntu/Debian Window Controls Missing Solution


    If Linux Mint 17 or other has no window buttons/controls you can do the following from terminal: marco --replace& Sometimes it can be fixed if you go to your themes/appearance and choose a new one but in the case like mine where Compiz is installed but not running/working then that fix will not work and will require the marco command above. What if you can't type in a terminal Window? If you close........
  • Linux Mint/Ubuntu/Debian Dual NICs networks problem when enabling and disabling one device


    The Scenario You have dual NICs and you disable NIC1 which uses 192.168.1.1 as its gateway. With NIC2 you enable it/connect it to another network which also has the gateway 192.168.1.1 Everything will work fine at this point. When switching back to NIC1 even with NIC2 disabled and even unplugged, the OS basically can't pick up the new/updated ARP entry of the old device for 192.168.1.1 and perhaps thinks it is a security risk or spoof of some sorts and blocks i........
  • Mount a SMB Samba share in fstab Linux Debian/Ubuntu/Centos


    Add the following to fstab where 192.168.1.125/Media is the samba share and where /home/homeuser/Downloads is where you want to mount. Change user and pass to what is needed (if no pass is required it still works fine with the below). //192.168.1.125/Media /home/homeuser/Downloads cifs user=guest,pass=bla 0 0 mount: wrong fs type, bad option, bad superblock on //192.168.1.125/Media, &nbs........
  • Bing/Microsoft Ads flex.atdmt.com causing problems for ad tracking and site loading


    I was asked to troubleshoot why a site wasn't loaded or responding properly, it turned out they were using some old javascript tracker from Bing/Microsoft that is no longer valid or working. You have to wait forever for it to time out but it really did disrupt the functionality of a very important site: flex.atdmt.com If you have the above code in javascript on your site remove or comment it out.........
  • Linux how to combine images into a single one using convert from ImageMagick


    convert -append file1.jpg file2.jpg output.jpg The above is all there is to it. file1.jpg and file2.jpg are the ones to combine (the order is used)and output.jpg is the combined image.........
  • Centos 6 how to guide convert LVM non-RAID into mdadm 1/10 RAID array live without reinstalling


    Here is the scenario you or a client have a remote machine that was installed as a standard/default minimal Centos 6.x machine on a single disk with LVM for whatever reason. Often many people do not know how to install it to a RAID array so it is common to have this problem and why reinstall if you don't need to? In some cases on a remote system you can't easily reinstall without physical or KVM access. So in this case you add a second physical or disk or already ha........
  • Centos cannot login by console or ssh session closed immediately


    In my case I could login with the initial install but I rsync'd everything over while preserving ownership and permissions to another RAID partition and booted from that.was fine before. The problem is that you are kicked out the second you login and the problem was SELINUX for some reason (perhaps it noticed something strange when it was moved to the new partition) login: pam_unix(login:session): session opened for user root by LOGIN(uid=0) login: ROOT LOG........
  • mount -o bind permanent in /etc/fstab howto


    mount -o bind /somedir /anotherdir In /etc/fstab /somedir /anotherdir none bind 0 0........
  • How To Install Linux Mint 17.2 on mdadm RAID with a separate boot partition


    Iwas surprised to see that Linux Mint at the latest 17.2 version still has NO mdadm installer option, and worse the installer will not be able to create a proper booting environment even when you do install it. How to setup mdadm in Linux mint LiveCD sudo su apt-get install mdadm # partition as you need and then create your mdadm devices # create your SWAP md0 mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /d........
  • Installing zoneminder on Ubuntu/Debian Linux Howto


    sudo apt-get install zoneminder [sudo] password for one: Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libuser-perl python-evince kdebase-apps kwrite unixodbc libgnomeprint2.2-data python-soappy vgabios python-metacity hddtemp python-mediaprof........
  • Centos/obfsproxy errors


    I never did get it working, it is too bad as obfsproxy should really be an option and integrated into the OpenVPN client and server or something similar: yum -y install python-pip python-devel No package python-pip available. #install the EPEL repo python-pip install obfsproxy python-pip install obfsproxy -bash: python-pip: command not found pip install obfsproxy &........
  • HP Procurve Switch 2824 CLI Telnet Experience , Guide and Tutorial


    ------------------------------------- ProCurve J4903A Switch 2824 Software revision I.10.77 Copyright (C) 1991-2009 Hewlett-Packard Co. All Rights Reserved. RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the Government is subject to restrictions........
  • dir2slideshow Centos rpm requirements


    yum -y install dvdauthor ffmpeg mjpegtools sox bc rpm -ivh dvd-slideshow-0.8.4-2.noarch.rpm Preparing... ########################################### [100%] 1:dvd-slideshow ########################################### [100%] /usr/bin/dir2slideshow: line 553: bc: command not f........
  • Centos automatic ifcfg-eth0 scripts based on list of IPs from bash


    It's a basic script that reads the file "ips.txt" in the current directory and then creates a corresponding ifcfg file     #!/bin/bash GATEWAY=192.168.1.1 NETMASK=255.255.255.0 device=eth0 counter=0 for ips in `cat ips.txt`; do........
  • Directadmin compile error solution cc: Internal error: Killed (program cc1)


    cc: Internal error: Killed (program cc1) Please submit a full bug report. See for instructions. make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1 make: *** Waiting for unfinished jobs.... Stopping crond: ........
  • bash shellshock how to manually patch when there is no update for Centos/Debian/Ubuntu/Fedora


    wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz tar xzvf bash-4.3.tar.gz cd bash-4.3/ wget --no-directories --level 1 --recursive http://ftp.gnu.org/gnu/bash/bash-4.3-patches/ for patch in `ls bash43-*|grep -v .sig$`; do echo applying "$patch" patch -p0 < $patch done ./configure;make;make install #it will install to /usr/bin/bash but if your bash is somewhere else you need to overwrite the old one.........
  • PayPal subscriptions automatically cancelling after creation of profile


    There is a weird quirk with how this works, but there is a variable called "src" that defaults to 0 or disabled if not specified as 1. The default 0 means not to recur billing on a subscription.  It's too bad it's not more obvious anywhere nor is there an explanation or warning during payment or after to both the seller and buyer. Here's a proper subscription code example that does recur and does not cancel........
  • CPanel Link to all of the command line options


    CPanel says you can access 98% of the functions through CLI which experienced Unix/Linux admins prefer for simplicity and for scripting.  I've never found CPanel easy to use from the admin panel, it seems everything is hard to find and a simple task becomes a series of hunts. So for people like me here's the list: http://cpanel.net/system-administrators/command-line-scrip........
  • PayPal Convert BuyNow Button to Plain HTML Link


    Say if you have a form/button like this: ........
  • mytop install errors


    mytop-1.4-2.el5.rf.noarch from rpmforge has depsolving problems --> Missing Dependency: perl(DBI) is needed by package mytop-1.4-2.el5.rf.noarch (rpmforge) solution: #disabling excludes is required on CPanel type boxes which exclude most updates including perl-DBI yum --disableexcludes=main install perl-DBI mytop-1.4-2.el5.rf.noarch from rpmforge has depsolving problems --> Missing Dependency:........
  • Argument list too long solution - rm -rf new/* -bash: /bin/rm: Argument list too long


    Have you ever tried to run a command like rm to delete several hundred thousand files? Iam not sure what the limit is but any time it is exceeded you need to use a work around like below (which will delete any number of files). Solution find . -maxdepth 1 -name "*.*" -print0 | xargs -0 rm........
  • How to update Open Office in Ubuntu/Debian if your repository is outdated or no longer supported


    http://sourceforge.net/projects/apacheoo-deb/files/debian/dists/wheezy/main/binary-i386/ To install AOO on your computer, you need to add the following entry to the /etc/apt/sources.list file: deb http://downloads.sourceforge.net/project/apacheoo-deb/debian wheezy main sudo apt-get update && sudo apt-get install openoffice-en* openoffice-brand-writer openoffice-brand-calc openoffice-brand-impress openoffice-brand-base open........
  • drbd won't create device if previous partition is on it Command 'drbdmeta 0 v08 /dev/md160 internal create-md' terminated with exit code 40


    This is what fixed it: [root@box13 ~]# dd if=/dev/zero of=/dev/md160 bs=512 count=500 Basically you need to wipe out more than just the 512 byte partition table so 512 bytes * 500 is more than enough to make DRBD happy and think the partition is now empty. The reason this happens is because it gets confused when there is a previous partition with data on the device you are using. root@box13 ~]# d........
  • Howto Convert Xen Image to KVM


    #count=10000 makes an image of 10000MB make sure your image is at least the same as your existing dd if=/dev/zero of=yourimage.img bs=1M count=10000 # losetup -fv newimage.raw # fdisk -cu /dev/loop0 # kpartx -a /dev/loop0 # dd if= of=/dev/mapper/loop0p1 # e2fsck -f /dev/mapper/loop0p1 # resize2fs /dev/mapper/loop0p1 # a lot of guides tell you to edit /etc/fst........
  • virtio KVM drivers download location


    http://realtechtalk.com/downloads/virtio-win-0.1-74.iso Current Direct stable URL from Fedora: https://fedoraproject.org/wiki/Windows_Virtio_Drivers Direct Downoad of Stable Virtio: https://fedorap........
  • OpenVZ mismatched kernel and dev when compiling.


    ./configure ./configure: line 91: cd: /lib/modules/2.6.32-042stab084.25/build: No such file or directory Error: kernel version not found. Please make sure your kernel is configured. dr-xr-xr-x. 4 root root 4096 Feb 21 06:13 .. lrwxrwxrwx 1 root root 45 Feb 21 06:13 build -> ../../../usr/src/kernels/2.6.32-042stab084.25 drwxr-xr-x 2 root root 4096 Feb 12 20........
  • CPanel Apache httpd won't start solution: Starting httpd: Syntax error on line 2 of /etc/httpd/conf/httpd.conf: Invalid command 'Alias', perhaps misspelled or defined by a module not included in the server configuration


    root@hkhosting [/]# service httpd start Starting httpd: Syntax error on line 2 of /etc/httpd/conf/httpd.conf: Invalid command 'Alias', perhaps misspelled or defined by a module not included in the server configuration ........
  • /usr/local/cpanel/bin/apache_conf_distiller 100% cpu


    On some CPanel installs we see complaints of "/usr/local/cpanel/bin/apache_conf_distiller" causing 100% cpu usage without any solution. Killing the process causes it to spawn again, actually it seems it tends to spawn multiple processes itself. Restarting CPanel itself is a temporary but not permanent solution.........
  • Linux Ubuntu Debian Howto Manually Update/Install Thunderbird


    wget http://download-location sudo tar xjvf thunderbird-24.2.0.tar.bz2 -C /opt ln -s /opt/thunderbird/thunderbird /usr/bin/thunderbird [sudo] password for one: ln: creating symbolic link `/usr/bin/thunderbird': File exists sudo rm /usr/bin/thunderbird ln -s /opt/thunderbird/thunderbird /usr/bin/thunderbird The above is how Idid it, if you don't do it properly you'll find that you are still using the old version (........
  • Linux Ubuntu Debian Howto Manually Update/Install Firefox


    wget http://download-location mv /usr/bin/firefox /usr/bin/firefox-old sudo tar xjvf firefox-26.0.tar.bz2 -C /opt ln -s /opt/firefox/firefox /usr/bin/firefox The above is how Idid it, if you don't do it properly you'll find that you are still using the old version (so verify in About that it is the new version). I've verified the above method works perfectly, it's great if you're using an older version of Linux and need to update the most........
  • kvm centos cannot compile error


    ./configure ./configure: cannot locate gcc 3.x. please install it or specify with --qemu-cc yum -y install gcc make ./configure ./configure: cannot locate gcc 3.x. please install it or specify with --qemu-cc yum -y install compat-gcc-* ./configure Error: Could not find alsa Make sure to have the alsa libs and headers installed. yum -y install alsa-lib-devel ./configure........
  • Linux find what processes are swapping


    Here is a handy script that will check all processes and report what is swapping #!/bin/bash for pid in `ps x|awk '{print $1}'`; do result=`cat /proc/$pid/status|grep VmSwap|awk '{print $2}'|grep -v ^"0"` if [ ! -z "$result" ]; then programresult=`ps x|grep $pid|grep -v grep` if [ $? == 0 ]; then program=`echo $programresult|awk '{print $5}'|grep -v ^grep`........
  • Migrate Linux Mint OS from one drive to another


    mount -o bind /proc /sda2/proc mount -o bind /dev/ /sda2/dev mount -o bind /sys /sda2/sys chroot /sda2 mint / # mount -o bind /proc /sda2/proc mint / # mount -o bind /dev/ /sda2/dev mint / # mount -o bind /sys /sda2/sys mint / # chroot /sda2 mint / # cd ~ mint ~ # ls Desktop mint ~ # cd / mint / # ls bin Desktop dev-temp home&nb........
  • PHP Security - Enable Safe Mode to increase security


    Everyone should be running with safe_mode on in /etc/php.ini (on Centos) as it makes exploiting your system more difficult is PHPcan't execute anything on the system if a script is exploited. For example with Safe_Mode on the only executable files on the system are ones in the safe_mode_exec_dir = /safephp This is crucial, if you must execute anything from PHPthen you have to copy the binary and assign to the user that Apache runs your site under.&........
  • CPanel suhosin install failed


    /scripts/phpextensionmgr install PHPSuHosin Updating md5sum list Fetching http://httpupdate.cpanel.net/cpanelsync/easy/targz.yaml (connected:0).......(request attempt 1/12)...Resolving httpupdate.cpanel.net...(resolve attempt 1/65)... Fetching http://httpupdate.cpanel.net/mirror_addr_list (connected:0).......(request attempt 1/3)......connecting to 74.50.120.123...@74.50.120.123......connected......receiving...100%......request success......Done........
  • Android how to copy rsync binary to main system for use in shell/ssh


    Install rsync4randroid and in the shell/ssh do this: ln -s /data/data/eu.kowalczuk.rsync4android/files/rsync /system/xbin/rsync........
  • Dell Perci 6/i Firmware Upgrade Guide Tutorial


    One thing to remember is that you need MegaCli to do the flashing. You also need the correct file,I tried at least 2 different Perc 6 firmwares from Dell that kept getting rejected as corrupt by MegaCli(they were really the wrong version). I have an external PCI-E Dell 6 Perc/I butI chose images from the 'Integrated" on motherboard version as it was allI could find. They are different, and below is my first time finding success.........
  • Dell Perc 6/i cannot downgrade


    I flashed an LSI Logic firmware to it and it broke the BIOS (cannot do Ctrl+R) for booting purposes but allows other functionality to work normally. I tried downgrading to a Dell firmware for Perc 6i but it won't work, not even with MegaCli wget http://downloads.dell.com/FOLDER00416606M/1/SAS-RAID_Firmware_W83M2_LN32_6.3.1-0003_A14.BIN --2013-08-26 12:53:39-- http://downloads.dell.com/FOLDER00416606M/1/SAS-RAID_Firmware_W83M2_LN32_6.3.1-0003_A14.BIN Resolvi........
  • pxe-32 tftp open timeout


    pxe-32 tftp open timeout The solution was to enable tftp in xinetd with "chkconfig tftp on". See the troubleshooting below: chkconfig --list NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off acpid 0:off&n........
  • yum update error


    yum update error Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 229, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 145, in main (result, resultmsgs) = base.buildTransaction() &nbs........
  • MySQL my.cnf Server How To Secure/Bind to Localhost and Prevent Outside Connections Solutions


    [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 bind-address=127.0.0.1 The key is "bind-address", set that to 127.0.0.1 and no one from outside the server can connect.........
  • SSH Can't Login/Hang


    Client Log OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to 192.168.1.253 [192.168.1.253] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/id_rsa type 1 debug1: identity file /root/.ssh/id_d........
  • Directadmin Log File Locations


    This is a handy link and list of all the relevant Directadmin log files and related servers. http://help.directadmin.com/item.php?id=11 DirectAdmin: /var/log/directadmin/error.log /var/log/directadmin/errortaskq.log /var/log/directadmin/system.log /var/log/directadmin/security.log Apache:........
  • How to log all PHP based E-mails for abuse


    Step #1 - Create Wrapper Script vi /usr/local/bin/phpsendmail #!/usr/bin/php ........
  • kvm cannot boot xen guest using lvm


    This booting error is because the Xen PV guest image uses the Xen kernel, this is not compatible with anything but a host running a Xen kernel. I did a kpartx -av virtual.img and then it created some partitions that showed up in fdisk. I mounted it and did a chroot into it and removed the xen kernel and installed a normal kernel but Xen still shows the same kernel in Grub (only the Xen one). This is strange but it seems like this Xen PV guest has some sort of hidden or........
  • Thunderbird How-To Copy/Backup/Restore Accounts and Settings to Another Computer


    The best way is to use rsync, I've set it up so it doesn't copy unnecessary files, or at least ones I'm sure aren't needed. Here is the rsync command Iused (adapt to your specific Thunderbird profile location): rsync -hazv user@remotehost.com:/home/user/.thunderbird/sbrer.default/* /home/user/.thunderbird/4nyb0.default/ --exclude=global* --exclude=Cache --exclude=ImapMail --exclude=Mail This is a great way to get your e-mail accounts going on a new c........
  • Disable SELinux How To Tutorial Solution


    Here is a quick script that works on most Centos versions to disable the virus/SELinux from blocking basic functionality. The first echo 0 statement disables SELinux instantly but it will still be enabled on reboot. The second line disables it permanently. #!/bin/bash #disable SELinux Immediately echo 0 > /selinux/enforce #disable SELinux Permanently sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config........
  • Directadmin Install Segfault Error


    ************************************* * * * All parts have been installed * *........
  • How To Install CPanel


    wget -N http://httpupdate.cpanel.net/latest;sh latest That one command above will do it all (and it takes a long time to install/compile). After that you can access CPanel with your root login information by visiting https://yourdomain-or-ip.com:2087 I personally don't like CPanel (bloated, full of bugs, no shared SSL, difficult to use etc..)but I admit it's easier to install than........
  • LOG: MAIN PANIC failed to expand condition "${if eq {$authenticated_id}{}{0}{${if eq {$sender_address}{$local_part@$domain}{0}{${if match{$received_protocol}{N^e?smtps?a$N}{${perl{checkbx_autowhitelist}{$authenticated_id}}}{${if eq{$received_prot


    I experienced this with CPanel's Exim after an auto-update (a Google of this error produces lots of complaints with few clear solutions). In this case I'll put the solution at the top. Run /scripts/buildeximconf to rebuild the Exim config and it should be fine after that. mail -vs "from test" user@dest.com < .bash_history LOG: MAIN cwd=/root 4 args: send-mail -i -v user@dest.com LOG: MAIN &........
  • Firefox Error ./firefox-bin: error while loading shared libraries: libxul.so: cannot open shared object file: No such file or directory


    When double clicking nothing happens/it doesn't open and when executing as ./firefox-bin you get this error: ./firefox-bin: error while loading shared libraries: libxul.so: cannot open shared object file: No such file or directory All the .so files reside within the directory of Firefox that you extract from the binary .tar.gz from Mozilla, it's just that your computer doesn't know/recognize where to look for them. Solution:........
  • Linux Ubuntu Nvidia GT430 Lockups/Errors/Freezes NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context


    I'm running Ubuntu 10.10 with Asus NVIDIA GT430 2.6.35-32-generic-pae #65-Ubuntu SMP Tue Jan 24 14:06:16 UTC 2012 i686 GNU/Linux Nvidia binary driver: 260.19.06 The screen sometimes completely freezes and locks up or everything starts going very slow: [1903398.100007] NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context [1903402.373210] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00........
  • What's Needed To Fix Linux


    I really am a Linux fan but my comments here may not show it. Although I'm quite familiar with Linux CLI to administer servers, I find Linux GUI OS's like Ubuntu at times very clunky. This is partially because there's no such thing as a "self-made" Linux from scratch where the UIwas designed by a single team. Linux is made up of several different projects that are generally completely separate and this lack of integratiion is a key issue that makes things f........
  • convert carat ^M/M Windows based text files to Linux


    carat M isn't this symbol ^ that you think, it can only be produced by typing "Ctrl-v, Ctrl-m". That you might see in text files saved from Windows. tofrodos is the package that has dos2unix which is basically the same scripts that replace ^M with /n tofrodos is the Debian/Buntu package name which has the dos2unix and unix2dos binaries........
  • vino crashed/stopped working, restart vino manually without rebooting


    The normal solution would be as follows: export DISPLAY=:0.0 /usr/lib/vino/vino-server & But what happens if that doesn't work? I haven't been able to find much documentation about how to find the list of displays and how their numbering works in Xorg. Sometimes you'll get this error when trying to restart vino: Cannot open display: For some reason my display is not on 0.0........
  • IO/delay and high load when a SATA hard drive dies


    dd if=/dev/sda of=/dev/null creates ever increasing load every second. After minutes the load has moved up to 4.79 I've tried with two different discs in my system. I wonder if it's a delay or problem with the SATA bus because one drive I have connected has recently failed. I notice when drives fail that you get some IO/blocking issue when they don't respond properly. Yes I believe it was, because here's the same disc after removing the dead........
  • Apache Crash Solution Can't Restart Due to Socket In use - (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting d


    (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down This will even trip you up if you have a service like monit to save you if httpd crashes. The only way to fix this is to either wait (it's not an option for production situations) or to kill the ghost httpd processes that wouldn't gracefully close: So........
  • vnstat setup guide/tutorial


    yum -y install vnstat chown nobody.nobody -R /var/lib/vnstat/ #replace venet0 below with your desired interface sudo -u nobody vnstat -u -i venet0 #edit: vi /etc/sysconfig/vnstat #VNSTAT_OPTIONS="-i venet0" # only use the sed below if you are using venet0 instead of eth0 or replace accordingly sed -i 's/eth0/venet0/g' /etc/sysconfig/vnstat [root@monitor]# yum install vn........
  • iPhone 3G/3GS/4 Undelete Photos/Videos Datarecovery


    I found this technique listed in many places which shows you how to use a common Linux tool "dd" to dump the raw partition of your iPhone. I give credit to this site for showing me the correct way to dd from the iPhone, I never thought to try it in the other direction:http://log.ijulien.com/post/182804914/iphone-3gs-data-recovery Requirements 1.) Jailbreak your........
  • encrypt bash scripts to hide source code


    http://www.datsi.fi.upm.es/~frosal/ SHC is a program written by the author above that does just that, it's a great little tool to have. Some have said it isn't exactly encrypting the code but just making it hard to read by obfuscating the code. There was also a good discussion about that here:........
  • monit example tutorial how to enable status checking and manipulation


    You need to enable the httpd daemon with monit to actually view the status and control, it's not only for the web interface since the httpd is theONLY way of controlling monit and viewing the status. monit monitor all will also reinstate disabled services if they've timed out too much. Just restarting the service will do nothing to re-monitor a service that monit has stopped monitoring due to too many failures. *Also note that /etc/monit.conf i........
  • Linux High IOWAIT updatedb can't be killed and crash with mdadm


    high IO wait 424 root 39 19 1900 848 552 D 0.0 0.0 0:00.91 updatedb root 424 0.0 0.0 1900 848 ? DN Mar11 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventp........
  • Firefox Download Error - /tmp/J_5JHKXU.bin.part could not be saved, because the source file could not be read. Try again later, or contact the server administrator.


    /tmp/J_5JHKXU.bin.part could not be saved, because the source file could not be read. Try again later, or contact the server administrator. This is actually not a download problem related to the server/site you're using but actually some weird bug with Firefox. I know because no matter what site I tried to download from this error kept happening. Simpy restarting Firefox was enough to get things working again.........
  • SPAMASSASSIN Enable Pyzor and DCC


    *Remember to restart spamassassin after all of this. DCC wget http://www.dcc-servers.net/dcc/source/dcc.tar.Z tar -zxvf dcc.tar.Z cd dcc-1.3.138/ ./configure;make;make install #enable DCC, uncomment the line that disables it near the top vi /etc/mail/spamassassin/v310.pre pyzor wget http://sourceforge.net/projects/pyzor/files/pyzor/0.5.0/pyzor-0.5.0.tar.gz/down........
  • Enable SPAMASSASSIN on Postfix in 5 minutes


    Centos 5 Postfix and SPAMASSASSIN Tutorial yum install spamassassin chkconfig spamassassin on vi /etc/mail/spamassassin/local.cf ############## #required_hits 5 #report_safe 0 #rewrite_header Subject [SPAM] #5 is the least restrictive (means only the most obvious SPAM is caught. 0 is obviously the most restrictive/sensitive and would have lots of false positives require........
  • Directadmin DA Install Guide


    yum -y install openssl* gcc-c++ gcc flex g++ make;wget http://www.directadmin.com/setup.sh;chmod +x ./setup.sh;./setup.sh #enable SSL /usr/bin/openssl req -x509 -newkey rsa:1024 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9999 -nodes chown diradmin:diradmin /usr/local/directadmin/conf/cakey.pem chmod 400 /usr/local/directadmin/conf/cakey.pem sed -i "s/SSL=0/SSL=1/g" /usr/local/dire........
  • ls: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory solution


    ls ls: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory This is not an ldd problem or case of anything missing, this only happened after I upradedUbuntu. declare -x PATH="/home/user/bin:/usr/local/bin:/usr/bin:/bin:/usr/games" "/home/user/bin" is the problem! It's weird because I have no idea how it happened.........
  • named/bind cannot find zone file, load zone files without specifying full directory path/loading master file genuine.com.zone: file not found


    genuine.com/IN: loading master file genuine.com.zone: file not found _default/genuine.com/IN: file not found I always found it silly that no one really talks about this and apparently many like me and even control panels like Plesk were still using hard paths. I always thought "why can't I just specify the name of the zone file and have bind find it". Surely the default search path must be /var/named or somewhere else but there is no such thing.........
  • Ubuntu 9.04 Crash


    CPU/Kernel/MB/RAID problem? Jan 5 12:45:05 testbox kernel: [653298.890004] BUG: soft lockup - CPU#0 stuck for 61s! [hal-acl-tool:4168] Jan 5 12:45:05 testbox kernel: [653298.890005] Modules linked in: vmnet vmci vmmon binfmt_misc drbd video output input_polldev ocfs2_stackglue ocfs2_dlmfs ocfs2_dlm ocfs2_nodemanager configfs k8temp hwmon_vid lp snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi........
  • Webmin/Virtualmin when enabling bind: Failed to save enabled features : Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND fe


    Webmin/Virtualmin when enabling bind: Failed to save enabled features : Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page. It means what it says, add "127.0.0.1" to /etc/resolv.conf........
  • Plesk: Backup Domains from the CLI - it's quicker


    Plesk 8.6 CLI backup: /usr/local/psa/bin/pleskbackup domains domain.com This is a much better way of doing it and of course it can be scripted, it's a real pain to point, click and wait for Plesk to backup domains (and yes Iknow you could do all of them in a single client file but this is not desirable for my situation).........
  • ERROR! MySQL manager or server PID file could not be found! ERROR! Manager of pid-file quit without updating file.


    I found the cause of this issue was from all the diskspace being used but clearing it was not enough. Iguess the tables became inconsistent when space ran out and myisamchk is what fixed the rest. service mysqld restart ERROR! MySQL manager or server PID file could not be found! ....................................................................................... ERROR! Manager of pid-file quit without updating file. se........
  • Installing Webmin & Enabling SSL


    Webmin Setup Centos 5: wget http://downloads.sourceforge.net/project/webadmin/webmin/1.530/webmin-1.530-1.noarch.rpm?r=http%3A%2F%2Fwww.webmin.com%2Fstandard.html&ts=1294339690&use_mirror=surfnet [1] 24229 [2] 24230 [root@host ~]# --2011-01-06 21:48:20-- http://downloads.sourceforge.net/project/webadmin/webmin/1.530/webmin-1.530-1.noarch.rpm?r=http%3A%2F%2Fwww.webmin.com%2Fstandard.html Resolving downloads.sourceforge.net... 216.34.181.........
  • mdadm/md-check how to check array integrity without rebuilding


    This doesn't seem to be widely known (maybe it's in some documentation that none of us read though)but there's an easy way to check the integrity of any mdadm array: sudo echo check > /sys/block/md0/md/sync_action -bash: /sys/block/md0/md/sync_action: Permission denied sudo will never work, this only works as root since echo is not actually a binary/command. It is built-into bash. /sys/devices/virtu........
  • rsync preserve attributes, permissions/ownership and times without being root non-root user


    One of the purposes of rsync is to backup whole filesystems and archive them but how can you do that properly and restore things to normal if all permissions and ownerships are not preserved from your root filesystem? It's not desirable to have everything running as root, especially not just for an rsync. The Easy rsync preserve permission solution for non-root users sudo is the answer and all you have to do is edit /etc/sudoers At the end o........
  • Ubuntu/Debian DRBD 8.0 Setup Guide


    I've only used it on Centos, soI thought I'd make a quick Debian guide: Install the DRBD Package apt-get install drbd8-utils Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libswfdec-0.8-0 Use 'apt-get autoremove' to remove them. The following........
  • VirtualBox Convert Import/Boot .vmdk VMWare Hard Disk/Drive Image Won't Work


    I wanted to Import/Use a .vmdk hard disk image file from VMWare. Generally you can just "point" VirtualBox to it and use it and it will work but I found an exception. One of my Centos 4.4 x64 images wouldn't boot. I had two copies, an older one and the newer one. The older one booted as normal (once I changed the VirtualBox driver to IDE from SATA). The newer one stopped at the "GRUB loading" message no matter what I tried. As far as........
  • yum in Centos 5/Xen halts and exits suddenly


    yum exits in the middle The problem is this VPS seems to be an OpenVZ template from HyperVM. The only way to make it work was to disable i386 packages since this was an x64 kernel. That shouldn't be necessary but it was the only way to make yum stop quitting after the first package or two. I couldn't find any issue by checking the logs either. echo y|yum install vim-minimal telnet expect jwhois net-tools slocate iptables elinks gawk L........
  • mdadm RAID 1 adventures


    I separated the 2 drives in the RAID 1 array. 1 is the old one /dev/sda and is out of date, while the separated other one /dev/sdc was in another drive and mounted and used with more data (updated). I wonder how mdadm will handle this: usb-storage: device scan complete md: md127 stopped. md: bind md: md127: raid array is not clean -- starting background reconstruction raid1: raid set md127 active with 1 out of 2 m........
  • Ubuntu 10.04/GRUB2 mdadm won't boot


    Moving to RAID was a pain. What you have to do is the following from an existing install: Install mdadm Create your mdadm RAID 1 array on your spare hard drive. Start it with the missing disk. rsync the entire contents of your current / to the md partition. Here's a good way of doing it: rsync -Pha --exclude=/proc/* --exclude=/sys/* --exclude=/mnt/* /. /mnt/md2........
  • How to chroot properly into your OS/distro


    From a LiveCD or if you're doing something like converting your non-RAID install to mdadm here's how you would chroot properly (you have to mount your proc, sys and dev on the running system/LiveCD to your chroot environment if you want things to work right, especially if you need to run update-initramfs due to a driver change etc..) *replace "path" with your mount/chroot path mount -o bind /proc /mnt/path/proc mount -o bind /dev/ mnt/pa........
  • EOL for Kubuntu/Ubuntu 8.04 - W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/intrepid/universe/source/Sources.gz 404 Not Found [IP: 91.189.92.171 80]


    I couldn't figure out whyI couldn't install a simple package. This is what's annoying about cutting edge Debian distros, yes we know you support each license on average for 1-2 years but why take down the supporting binary packages and basically disable the older versions? sudo apt-get install update Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find p........
  • PHP Email Attachment Corrupt Solution


    I couldn't figure out why this wouldn't work, a test script in the root of my htdocs folder worked fine. Within some subdirectories the same code would produce different base64 results but I didn't know hwy. Archive: /tmp/archive.zip Zip file size: 6888 bytes, number of entries: 92 error [/tmp/archive.zip]: missing 242827681 bytes in zipfile (attempting to process anyway) error [/tmp/archive.zip]: attempt........
  • Wine stopped working/won't work Solution


    After an upgrade wine wouldn't open anything, not even the pre-installed notepad. There are no wine logs and nothing is mentioned in any standard log file about why. I finally decided to run wine from the shell and see what's going on: wine client error:0: version mismatch 398/402. Your wineserver binary was not upgraded correctly, or you have an older one somewhere in your PATH. Or maybe the wrong wineserver is still running?........
  • Nautilus/GNOME File Manager handy list of extensions


    nautilus-gksu - privilege granting extension for nautilus using gksu nautilus-sendto - integrates Evolution and Pidgin into the Nautilus file manager nautilus-share - Nautilus extension to share folder using Samba nautilus-actions - nautilus extension to configure programs to launch nautilus-bzr - Bazaar (bzr) integration for nautilus nautilus-cd-burner - CD Burning front-end for Nautilus nautilus-clamscan - Antivirus scanning for Nautilus n........
  • expect script debugging


    expect script debugging Add the "-d" switch. #!/usr/bin/expect I have a problem writing something to a telnet session: send: sending "statusn" to { exp6 } send: sending "quitr" to { exp6 } write() failed to write anything - will sleep(1) and retry... The solution for my telnet script was to add the &q........
  • Directadmin License Error The ip of this machine (xx.xx.xx.xx) does not match the ip in the license file.
    Check the value of your ethernet_dev=venet0:0 setting in your /usr/local/directadmin/conf/directadmin.conf file and the output of /sbin/ifco


    2010:09:09-22:22:11: The ip of this machine (xx.xx.xx.xx) does not match the ip in the license file. Check the value of your ethernet_dev=venet0:0 setting in your /usr/local/directadmin/conf/directadmin.conf file and the output of /sbin/ifconfig Solution /usr/local/directadmin/scripts/getLicense.sh........
  • How not to change an IP address in CPanel during a migration


    /usr/local/cpanel/bin/swapip domain(s) It simply doesn't work, the Apache VHOSTS remain 100% unchanged, why does this script exist? I'm sure it would work from the control panel but I am locked out because my IP was changed and it doesn't match the CPanel license. I wish CPanel would make it easier to update the license IP. I even took it a step farther, I manually edited the vhosts and restarted Apache and it........
  • sed script to automatically update IPs in named/BIND and httpd/Apache


    Always make a backup of the original file before trying this, I find this kind of thing when updating IPs etc.. to use a script. Where the old IP is "192.168.5.8" and the new IP is "10.10.5.8" sed -i s/192.168.5.8/10.10.5.8/g testdomain.org.db The -i with sed means "inline" meaning we edit the file directly, but without the -i we could just use >and output the results to another file or do whatever else we wanted.........
  • DirectAdmin Install Webalizer Stats


    I can't believe it comes without any sort of stats built-in and they don't make it easy to find out how to integrate it. I downloaded the following: wget -O /usr/bin/webalizer http://files.directadmin.com/services/es_5.3/webalizer chmod 755 /usr/bin/webalizer echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue........
  • jailkit for chroot ssh account security tutorial and fix for error


    This was done on Centos butI think it's easier on Debian machines, the paths that it is set to use are tailored towards Debian, so there is some fiddling that needs to be done on Centos. This is for chrooting ssh, but jailkit has other uses than just SSH jails but I won't cover them in this writeup. 1. Install jailkit yum install jailkit 2. Setup Jail Home mkdir /home/jail chown root:root /home/ja........
  • After installation Directadmin does not work directadmin dead but pid file exists on OpenVZ VPS when browsing http://ip.ip.ip.ip:2222


    After installation Directadmin does not work on OpenVZ VPS when browsing http://ip.ip.ip.ip:2222 service directadmin status directadmin dead but pid file exists tail /var/log/directadmin/error.log Check the value of your ethernet_dev=eth0 setting in your /usr/local/directadmin/conf/directadmin.conf file and the output of /sbin/ifconfig 2010:07:10-12:44:01: ioctl can't find........
  • md: kicking non-fresh sda1 from array! - fix/solution


    md: Autodetecting RAID arrays. md: autorun ... md: considering sdb1 ... md: adding sdb1 ... md: adding sda1 ... md: created md0 md: bind md: bind md: running: md: kicking non-fresh sda1 from array! md: unbind md: export_rdev(sda1) raid1: raid set md0 active with 1 out of 2 mirrors The md0 raid kicked sda1 ou........
  • Realtek r8169 1gbit/1000mbit NIC/Ethernet Goes Down/Halts on Large File Transfer/Heavy Network Usage


    This is obviously a bug in the r8169 kernel module and it seems to affect a lot of people. I upgraded to the latest kernel and hope this won't happen anymore, as it is a very serious error. This is especially serious for those who are running servers with this chipset, who can afford for the NIC to randomly go off-line for no apparent reason? [655548.189113] type=1505 audit(1277067560.902:5): operation="profile_load" name="/usr/bin/freshclam&q........
  • Use rcconf to edit startup/init.d/init scripts on Debian/Ubuntu based distributions


    I've never understood how to enable and disable services for different run levels in Debian based distros, it's just weird, annoying and doesn't make sense. I much prefer chkconfig from RHEL. Just install the package called 'rcconf' and be done with it. rcconf makes things easy for you. apt-get install rcconf Reading package lists... Done Building dependency tree Reading state information... Done........
  • Linux Centos/RHEL can't find php/apache/httpd/mysql/ftp/exim/sendmail ?


    I wasted a lot of time wondering why I could never find those packages. Check the /etc/yum.conf file and at the bottom look for the "exclude=" line. Below is what I found in mine exclude=apache* httpd* mod_* mysql* MySQL* da_* *ftp* exim* sendmail* php* bind-chroot* Just remove those entries or uncomment that line and you'll get access to the missing applications.........
  • chroot into an off-line Linux version using a LiveCD/USB


    It's not just as simple as running the chroot command, you need to ensure the /proc and /dev entries are passed through and populated to the chroot environment. Step 1 - Mount Your Off-lineOS mount /dev/sda1 /mnt Step 2 - Mount Proc mount -t proc none /mnt/proc Step 3 - Mount Dev Most guides will tell you to use this: mount -o bind /dev /mnt//dev but that doesn't work for some reason in many cases: mount: wron........
  • SSH Automatic/Passwordless Logon - Setup Public Key Encryption In Single Command


    This is a very simple solution, but most guides out there make you login twice (once to scp the key) and once to put the key in authorized_keys. There's no need for that. If you don't already have a ~/.ssh/id_rsa.pub just type "ssh-keygen -t rsa" and keep hitting enter until it's done :) Just use this code to easily enable passwordless login with SSHD key=`cat ~/.ssh/id_rsa.pub`;ssh user@192.168.5.25 "echo $key >> ~/.ssh/auth........
  • Monitor MB/s Disk IO Usage/Bandwidth - Use iostat from the sysstat Package


    The binary "iostat" comes from the package "sysstat" and is available on all Linux/Unix like platforms. Use the "-m" option to give you what you probably want, which is to see in MB/s how much bandwidth each disk is doing. iostat -m Linux 2.6.24.2 ((none)) 04/16/10 avg-cpu: %user %nice %system %iowait %steal %idle ........
  • email2fax and Asterisk to do eFaxing


    It's basically free bash shell script available from: http://wpkg.org/email2fax/index.php/Main_Page Make sure you have the required tools: libtiff ghostscript mpack/munpack Where you can e-mail your Asterisk box and it will fax it to the phone number in the subject line. The good news ends there, it is fairly undocumented and buggy. Take for example how the documentation mentions you can invoke from the com........
  • Picking an FTPD (vsftpd) Server in Linux Centos/Debian


    I decided on using yum to help me decide even though I normaly use proftpd I decided to see what else I could find. yum search ftp Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * rpmforge: ftp-stud.fht-esslingen.de * base: mirrors.netdna.com * updates: updates.interworx.info * addons: yum.singlehop.com * extras: mirrors.netdna.com rpmforge........
  • OpenVZ backup container to a single file while it's running using "vzdump"


    Proxmox has made this free utility to backup running OpenVZ containers. It's a great program which is actually just a PERL script but gets the job done. This program is not 100% required because all it really does is cp -a from your container's path as far as I know but it is still good to have uniformity to how you backup your containers. For RPM distros such as Centos/RHEL/Fedora etc.. download and install this: wget http://www.proxmox.com/cms_proxm........
  • PHP cannot access /usr/bin/openssl


    PHP cannot access /usr/bin/opensslI have verified the username that runs the process is able to access /usr/bin/openssl and it does exist but the PHP script is saying it doesn't exist: [code:1:1fd0f3abbe] if (!file_exists($OPENSSL)) { //echo "ERROR: OPENSSL $OPENSSL not foundn"; }[/code:1:1fd0f3abbe] I don't get itI can clearly see the contents of /usr/bin by using the PHP system fu........
  • rsync bash script


    rsync bash script [code:1:722d8a25c1]#!/bin/bash # config --------------------------------- # two methods # from = receive data from another server # to = send data to another server rsync_method=from rsync_ip='192.168.5.18' local_dir='/home/backupguy/backups' remote_dir='/home/backup' free_space_bin='/home/backups/freediskspace.sh' # config end ------------------------------ if [ '$rsync_me........
  • freebsd-update *Updates binary packages*


    freebsd-update *Updates binary packages*[code:1:5ea2818369]pkg_add -r freebsd-update[/code:1:5ea2818369] Great for security updates/patches........
  • Centos 4.3 x64 & VMWare Server Beta


    Centos 4.3 x64 & VMWare Server Beta[code:1:6d0b2c8c2f] The correct version of one or more libraries needed to run VMware Server may be missing. This is the output of ldd /usr/bin/vmware: linux-gate.so.1 => (0xffffe000) libm.so.6 => /lib/tls/libm.so.6 (0xf7fbd000) libdl.so.2 => /lib/libdl.so.2 (0xf7fb9000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0xf7fa7000) libX11.so.6 => not f........
  • Need identd for port 113 ? Install authd


    Need identd for port 113 ? Install authdyum install authd Happy identing :)Actually it's not that simple. It installs as an "xinetd" service and is disabled and turned off by deafult. To enable it run: [code:1:8c94df8319] chkconfig --level 3 auth on service xinetd restart [/code:1:8c94df8319] This will set identd aka authd to start by default. service xinetd resta........
  • /usr/bin/ld: cannot open crt1.o: No such file or directory


    /usr/bin/ld: cannot open crt1.o: No such file or directory[quote:812bec9db7]/usr/bin/ld: cannot open crt1.o: No such file or directory collect2: ld returned 1 exit status[/quote:812bec9db7] This is annoying and in my case it happened on Centos AMD 64 when compiling a 32bit program with GCC. Install glibc-devel.i386 (make sure you get the i386 version and not the native 64 bit version which is likely already installed). The joys of 3........
  • Backup Shell Script


    Backup Shell Script[quote:aaa4b0b165]#!/bin/sh date=`date -I` mysqldump --all-databases | gzip > /var/backup/backup-$date.sql.gz [/quote:aaa4b0b165] Something like that could be useful as a cronjob to locally or remotely backup your databases........
  • Basic Port Listing


    Basic Port ListingHopefully someone finds this useful or at least interesting. http://www.sans.org/top20/#u9 Name Port Protocol Description Small services ........
  • Linux Kernel Error (2.6.33.1) BUG: Bad page state in process swapper - Keeps rebooting - initramfs bug


    *This is a bug with initramfs support, all kernels after around 2.6.27.54 suffer from this problem. If you try to include initramfs into your kernel (I mean actually building your binaries into the kernel) this will always happen. Obviously some code has changed in recent kernels that is present in all new kernels, it makes it impossible to boot I've tried the latest 2.6.32, 2.6.33, 2.6.34, 2.6.35, 2.6.36, 2.6.37, 2.6.38 kernels and they all do this. I found one bug re........
  • auth/auth_util.c:make_server_info_sam(840) User nobody in passdb, but getpwnam() fails! - SAMBA/SMB Error How To Fix


    auth/auth_util.c:make_server_info_sam(840) User nobody in passdb, but getpwnam() fails! I never found the solution to this in the web, as usual so Ithought I'd post the fix. In plain English smbd is telling us that the user "nobody" does not exist in /etc/passwd. You can simply add this to your /etc/passwd file like so: nobody:x:65534:65534:nobody:/nonexistent:/sbin/nologin Now SAMBA/smbd should........
  • How to Track Down/Find Cause of Linux high disk iowait/wa


    top - 09:34:12 up 2 days, 20:57, 2 users, load average: 1.83, 1.99, 2.03 Tasks: 59 total, 2 running, 57 sleeping, 0 stopped, 0 zombie Cpu(s): 0.3%us, 0.0%sy, 0.0%ni, 0.0%id, 99.7%wa, 0.0%hi, 0.0%si, 0.0%st That 99.7% wa is iowait, it means the server is waiting for a process to complete an IOoperation or in plain English, there is a delay in........
  • yum error not working rpmdb: mmap: No such device TypeError: rpmdb open failed


    Loaded plugins: fastestmirror rpmdb: mmap: No such device error: db4 error(19) from dbenv->open: No such device error: cannot open Packages index using db3 - No such device (19) error: cannot open Packages database in /var/lib/rpm Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py&qu........
  • Timezone Change/Updated for Linux/Unix Debian/Fedora/Ubuntu/Centos Change Update Time zone


    In Newer Linux Distros This Way Is Easiest and works on newer versions like Ubuntu, Mint, Fedora, Centos, Debian etc. #if you are missing timedatectl this in newer distros like Ubuntu/Mint/Debian and are using a container like Docker then do "apt install systemd" timedatectl set-timezone America/Vancouver Replace the America/Vancouver with the correct timezone. To see the list you can just type "timedatectl set........
  • sudo: Error dropping capabilities, aborting in Linux Centos 5.3


    For some reason Ikeep getting this error when trying to run a sudo command eg: sudo -u someuser somecommand sudo: Error dropping capabilities, aborting My version of sudo is:sudo-1.6.9p17-3.el5_3.1 and I've heard that version 1.7 fixes everything. The only thing is yum does not think sudo has any update. Iguess the new version has not been committed to the RPM repository yet. This is really a huge and ann........
  • Using a Mac OSX DMG Image in Windows and Converting to Standard ISO Format use dmg2iso


    The dmg format is silly and annoying to work with, why couldn't Apple stick with the .iso standard? Anyway, there's an excellent Linux and Windows based tool to convert it back to a normal .iso Image called dmg2iso I'll only cover theLinux version although the Windows pre-built binary works the same way. Download dmg2iso here for free (from the author's website) It's just silly and doesn't make sense that Ubuntu doe........
  • OCFS2 crash


    When trying to even cd or ls the mounted OCFS2 partition it crashes. Ithink this is a combination of VMWare Server's problem and the way I mounted and symlinked to it. More than anything this shows the problem and lack of forsight with VMWare, but also that OCFS2 is easily crashed if you do strange things. Output of /var/log/messages for OCFS2 Apr 10 15:57:45 localhost kernel: [84331.691258] Modules linked in: vmnet vmci vmmon ocfs2_stac........
  • Samba SMB Error - Server not using user level security and no password supplied. tree connect failed: NT_STATUS_WRONG_PASSWORD


    Server not using user level security and no password supplied. tree connect failed: NT_STATUS_WRONG_PASSWORD That happens when trying to use smbclient to connect to a share. The weird thing is that I can authnenticate just fine from Windows XP. It is partially my mistake, I forgot this share does have a password. I've tried authenticating with the correct user and also with "Guest" because this works in Windows. In Linux I ........
  • BIND/NAMED woes


    Feb 5 01:39:33 server named[19768]: zone myzone.com/IN: serial number (12331465) received from master 127.0.0.2#53 < ours (200901281) The above is taken from /var/log/messages This can be annoying, it can happen for a variety of reasons. What seems to be happening here is that the slave realizes the time on the slave is ahead of the master, so it therefore assumes it has the most up to date copy and won't actually transfer the zone. The solutio........
  • Latest Articles

  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint
  • Save money on bandwidth by disabling reflective rpc queries in Linux CentOS RHEL Ubuntu Debian
  • How to access a disk with bad superblock Linux Ubuntu Debian Redhat CentOS ext3 ext4
  • ImageMagick error convert solution - convert-im6.q16: cache resources exhausted
  • PTY allocation request failed on channel 0 solution
  • docker error not supported as upperdir failed to start daemon: error initializing graphdriver: driver not supported
  • Migrated Linux Ubuntu Mint not starting services due to broken /var/run and dbus - Failed to connect to bus: No such file or directory solution
  • qemu-system-x86_64: Initialization of device ide-hd failed: Failed to get