C-NET :: PROJECTS

ls -t projects/ | grep -i "Solved Problems"

Solved Problems

2025

Posting table data to a web API using PowerQuery in Excel

How to send Excel table data to a web API from PowerQuery by building a CSV payload and forcing Excel to make the request.

Howto's · Windows · Solved Problems · Software

2024

Quickly generate a 10 year, base64 encoded, self signed, client cert using OpenSSL

A bash script that makes a self-signed client certificate valid for 10 years with OpenSSL and prints the PFX as base64.

Reference · Solved Problems
What the heck is Windows Antimalware Service scanning all the time?

How to find the files Windows Defender keeps scanning with MpPerformanceRecording, and exclude them to cut CPU use.

Windows · Solved Problems

2022

Allowing an empty JSON body, or no Content-Type, in a C# ASP.NET Core API

An ASP.NET Core attribute that accepts requests with an empty body or no Content-Type, avoiding 415 and 400 errors on net6 and older.

Reference · Solved Problems
Moving columns in PowerQuery without naming every column

How to move a column to a given position in Power Query without naming every column, also when merging and expanding tables.

Windows · Reference · Solved Problems

2021

Allowing RDP remote passwords in Windows 10 in 2021

How to stop Windows 10 from prompting for a password when connecting with saved RDP credentials, through a Group Policy setting.

Windows · Reference · Solved Problems
DNS names for VirtualBox client machines

A PowerShell script that adds the IP addresses of running VirtualBox guests to the Windows hosts file, and autostarts chosen VMs headless.

Howto's · Linux · Windows · Reference · Solved Problems
DNS names for Hyper-V client machines

A PowerShell script that keeps the Windows hosts file updated with the IP addresses of running Hyper-V virtual machines.

Howto's · Linux · Windows · Solved Problems
Web Echo Service for developers

A pointer to the C-Net Echo Service, which returns the exact HTTP request it receives, for web client and proxy development.

Linux · Reference · Solved Problems

2020

curl SSL fails even with ca-certificates installed

How to fix curl error 60 in a Docker container that has ca-certificates installed, by forcing a certificate rehash.

Linux · Reference · Solved Problems
GLaDOS Voice Generator (weekend project)

Announcement of the GLaDOS Voice Generator, a replacement for an offline GLaDOS speech synthesis site.

Reference · Solved Problems · Software

2019

“Invalid provider type specified” CryptographicException when accessing the PrivateKey property of a certificate in C#/.Net

How to fix the .Net "Invalid provider type specified" error on a certificate's private key by converting the CNG key to an RSA key with OpenSSL.

Windows · Solved Problems
Docker starts slowly on Raspberry Pi / Raspbian

How to fix Docker taking minutes to start on a Raspberry Pi running Raspbian, caused by a lack of random entropy, by installing haveged.

Howto's · Linux · Solved Problems
Reinstalling a used iMac (20-inch, Early 2008)

How a used iMac (20-inch, Early 2008) was reinstalled from a USB stick after the recovery installer demanded a linked Apple ID.

Rants · Solved Problems
The trust relationship between this workstation and the primary domain failed

How to fix a lost trust relationship with the domain on a restored Windows machine with Reset-ComputerMachinePassword, without rejoining the domain.

Windows · Reference · Solved Problems
Binary pastebin

Announcement of paste.c-net.org, a console friendly pastebin that also accepts binary files.

Linux · Solved Problems

2018

Recovering versioned files from Owncloud's data directory

How to find versioned files in ownCloud's data directory and copy them out with readable timestamped names.

Howto's · Linux · Solved Problems
Who deleted the files from the Windows file server?

How to audit file deletions on a Windows file server and find who deleted a file, with a PowerShell script that reads the Security log.

Windows · Solved Problems
ClipWriter, a PowerShell script that emulates keyboard input to transfer files and text

ClipWriter, an open source PowerShell script that types text, files and directory trees into remote sessions that block pasting and file transfer.

Rants · Windows · Solved Problems
Forcing Cygwin to create sane permissions on Windows

How to stop Cygwin from creating incorrectly ordered Windows permissions by adding noacl to the /cygdrive mount options.

Linux · Windows · Solved Problems
Property 'BindToHostTpm' does not exist in class 'Msvm_SecuritySettingData'

How to disable Secure Boot on a Hyper-V Server guest with PowerShell when Hyper-V Manager shows the BindToHostTpm error on the Security tab.

Windows · Solved Problems
Script for creating a compressed image file from a Raspbian SD card

A script that shrinks a Raspbian SD card, zero-fills its free space and saves it as a compressed image file.

Howto's · Linux · Solved Problems
My tweaks to get Kali Linux running well on the GPD Pocket

Tweaks for Kali Linux on the GPD Pocket: no GRUB splash, WiFi and power settings with tlp, lid screen handling and xorg config.

Linux · Reference · Solved Problems
Outlook removes "extra line breaks" from plain text emails: How to stop it

How to stop Outlook from removing line breaks in plain text emails, in Outlook's options or by ending each line with three spaces.

Windows · Solved Problems
How to deal with error 0xC03F6506 when upgrading stubborn Windows 10 Home Edition machines to Pro using a VLK

How to upgrade Windows 10 Home to Pro with the generic upgrade key when activation fails with error 0xC03F6506.

Windows · Solved Problems
Shrinking a Windows 10 installation for small harddrives

How to save disk space on small Windows 10 devices by compressing the operating system files with compact.exe /CompactOS.

Howto's · Windows · Solved Problems
Drivers for the Multicom Talisa U230

A download of the WiFi driver and the other drivers for the Multicom Talisa U230 laptop that Windows Update does not provide.

Windows · Reference · Solved Problems
Checking for required packages on a Debian (or derivative) system

A Bash snippet that checks a list of required Debian packages with a single dpkg-query call and reports the missing ones.

Linux · Reference · Solved Problems
Avoid having Visual Studio put all its floating windows on top

How to stop Visual Studio's floating tool windows from staying on top of other applications on multi-screen setups.

Windows · Solved Problems

2017

Sleeping without a subprocess in Bash, and how to sleep forever

A Bash function that sleeps, or sleeps forever, with the read builtin on a process substitution instead of running the external sleep command.

Howto's · Linux · Solved Problems
Making Windows keep the system clock in UTC

How to make Windows keep the hardware clock in UTC with the RealTimeIsUniversal registry value, for virtual machines and dual boot.

Windows · Solved Problems
Creating a local Certificate Authority using OpenSSL

Pointers to guides for running a local OpenSSL certificate authority and adding custom fields to client certificates.

Reference · Solved Problems
Shrinking a Raspbian installation and re-enabling auto expanding for distribution of customized images

How to shrink a customized Raspbian SD card into a small image file that expands again on first boot.

Howto's · Linux · Solved Problems
Handling multiple overlapping VPN client networks with pfSense and a reflector VM

How to reach VPN client networks that overlap your own or each other with pfSense, outbound NAT and a Shorewall reflector VM.

Howto's · Linux · Solved Problems
Making a minimal VPN routing virtual machine to isolate obnoxious VPN clients

How to build a small Debian VM with OpenConnect and Shorewall that routes traffic to a client VPN, kept apart from pfSense.

Howto's · Linux · Solved Problems
BashDB, a single dynamic database table for bash scripts

BashDB, a Bash library that stores a single key and value table with dynamic columns and lists, to keep persistent state in shell scripts.

Howto's · Linux · Solved Problems
Figuring out which session is blocking a query on Microsoft SQL Server (query suspended)

A SQL Server query that shows which session is blocking which, to find the cause of suspended queries and lock waits.

Howto's · Windows · Reference · Solved Problems
Using IPv6 SLAAC with IP forwarding on Debian Stretch ("connect: network is unreachable", no default gateway)

How to make a Debian Stretch host with IP forwarding enabled accept IPv6 router advertisements and get a default route, by setting accept_ra to 2.

Linux · Solved Problems
Exim4 line length in Debian Stretch - "Mail delivery failed: returning message to sender"

How to make Exim4 in Debian Stretch accept emails with lines longer than 998 characters instead of returning them to the sender.

Linux · Solved Problems
Understanding mcelog ECC errors - Which stick of RAM is broken?

How to find the faulty RAM stick from an mcelog ECC error, by matching its memory address to a DIMM slot with dmidecode.

Linux · Solved Problems
Finding duplicate files with Bash

cdupes, a Bash script that finds duplicate files by size and checksum with find and a few pipes, much like fdupes.

Howto's · Linux · Solved Problems
Cygwin for Windows XP - fast mirror

Where to get the last Cygwin release that works on Windows XP from a fast mirror, and the setup option needed to install from it.

Windows · Solved Problems
The Intel 82579V on Hyper-V Server 2016, installing unsupported network adapters

How to install the Intel 82579V network driver on Hyper-V Server 2016 by editing the driver .inf file and disabling driver signature checks.

Windows · Solved Problems
Killing a process tree, killing a PID and all children

Two Bash functions that kill a process and all its children recursively, or all children of the current script.

Linux · Solved Problems
Making a telnet server with Bash and tcpserver

How to serve a Bash script over telnet with tcpserver, and a function library that handles telnet line endings, ctrl+c and password input.

Linux · Solved Problems
apt-get reports Packages not found

How to fix 404 errors from apt-get update on Debian by removing stale partial package lists, and what else to check if that does not help.

Linux · Solved Problems
Reset dpkg (apt) package configuration to default, restore deleted config files

How to restore a Debian package's deleted or changed config files with dpkg or apt-get and --force-confmiss.

Linux · Reference · Solved Problems
How to remove the "Favorites" button from Internet Explorer 8 on Windows XP

How to remove the Favorites button from the Internet Explorer 8 favorites bar on Windows XP with the NoCommandBar registry policy.

Windows · Solved Problems
The Windows XP PowerToys, archived here for your pleasure

An archive of the Microsoft PowerToys for Windows XP, with a short description of each tool.

Windows · Solved Problems

2016

Duplicate bind mounts with chroots on systemd

How to stop duplicate bind mounts in chroot jails on systemd by marking the fstab bind mounts private.

Linux · Solved Problems
Automatic Windows Logon on Domain Member Machines

How to enable automatic Windows logon on a domain member machine by setting the WinLogon registry values.

Howto's · Windows · Solved Problems
Shrinking the MS SQL Server "tempdb" (when it won't shrink)

How to shrink the MS SQL Server tempdb database when it refuses to shrink, by freeing the caches first.

Howto's · Windows · Solved Problems
Fixing empty search results in the Windows 10 Settings (the shiny new Control Panel)

How to fix empty search results in the Windows 10 Settings app by toggling content indexing on its LocalState Indexed folder.

Howto's · Windows · Solved Problems
W: [pulseaudio] authkey.c: Failed to open cookie file '/home/user/.config/pulse/cookie': No such file or directory

How to fix the PulseAudio warning about a missing ~/.config/pulse/cookie file by symlinking the old cookie file.

Linux · Solved Problems
Export certificates marked as not exportable in the Windows certificate manager

How to export certificates and private keys marked as not exportable from the Windows certificate store with Mimikatz, and convert them for Wireshark.

Windows · Solved Problems · Software
Some fonts shown as squares in Kali Linux

How to fix fonts shown as squares in Kali Linux by rebuilding the font cache.

Linux · Reference · Solved Problems
Enabling Quick Launch in Windows 10

How to add the classic Quick Launch toolbar to the Windows 10 taskbar, so pinned programs stay in place.

Windows · Reference · Solved Problems
Find and kill long running MS SQL Server queries

SQL queries to list running MS SQL Server queries by elapsed time and to kill one or all long-running ones.

Windows · Reference · Solved Problems
pfSense as a Cisco AnyConnect VPN Client using OpenConnect

How to install OpenConnect on pfSense, keep a Cisco AnyConnect VPN connection up from cron and add its interface to the GUI.

Howto's · Linux · Solved Problems

2015

Force removal of a package that's "is in a very bad inconsistent state"

How to force dpkg to remove a package that is in a very bad inconsistent state.

Linux · Reference · Solved Problems
Error 0x80041002 from PowerShell after upgrade to Windows 10

How to fix error 0x80041002 from New-ScheduledTaskTrigger after a Windows 10 upgrade by rebuilding the WMI repository with a batch file.

Windows · Solved Problems
Relay UDP broadcasts between subnets in pfSense

A script that relays UDP broadcasts between subnets in pfSense, with tcpdump and tcpreplay.

Linux · Solved Problems
Solution: Using ProxyPass from http to https in apache2 causes AH02032 SNI error

How to fix the AH02032 SNI hostname error when Apache proxies from HTTP to an internal HTTPS server, by turning off ProxyAddHeaders.

Linux · Solved Problems
The fastest way to extend disk image files on Linux

How to grow a virtual machine disk image file on Linux with the truncate tool instead of dd.

Linux · Reference · Solved Problems
How to use a gateway outside of the local subnet on Linux

How to route all traffic on Debian through a gateway with a private IP outside the local public subnet.

Howto's · Linux · Solved Problems
MSSQL Mass Delete

How to delete large amounts of data from a SQL Server table in small chunks with DELETE TOP.

Howto's · Windows · Reference · Solved Problems
dovecot: master: Error: systemd listens on port 143, but it’s not configured in Dovecot. Closing.

How to stop Dovecot's systemd socket errors after an upgrade from Debian Wheezy to Jessie by disabling dovecot.socket.

Linux · Solved Problems
Installing Windows Live Essentials on Windows XP - Error: OnCatalogResult: 0x80190194

How to install Windows Live Essentials on Windows XP when the web installer fails with OnCatalogResult 0x80190194, using archived offline installers.

Windows · Solved Problems
Deleting duplicates in SQL Server before adding a Unique Index

How to delete only the duplicate rows in a SQL Server table with ROW_NUMBER() so that a unique index can be added.

Windows · Reference · Solved Problems
Taking a screenshot of an entire page with Firefox, saved as a .png

How to save a full-page screenshot as a PNG with the Firefox developer toolbar.

Linux · Windows · Solved Problems
Disable the startup page in Vistual Studio 2013 Community Edition (and probably all others)

How to disable the start page in Visual Studio 2013 Community Edition.

Windows · Solved Problems
Renaming an MSSQL instance (Invalid Urn filter on server level)

How to fix "Invalid Urn filter on server level" by renaming the SQL Server instance after a host rename.

Windows · Solved Problems
Restarting a VPN client on pfSense through the CLI (SSH)

How to restart an OpenVPN client on pfSense from another machine over SSH with a small script, for a flaky VPN connection.

Howto's · Linux · Solved Problems
Weakening Windows Server 2012

Where to find the Windows Server 2012 settings for password policy, Ctrl+Alt+Del, Shutdown Event Tracker, IE Enhanced Security and remote desktop shadowing.

Windows · Solved Problems
Using a Windows 8 upgrade key for a clean install

How to activate a clean Windows 8 install with an upgrade key by resetting MediaBootInstall and running slmgr /rearm.

Windows · Solved Problems

2014

Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

How to fix the IIS ManagedPipelineHandler bad module error by registering ASP.NET 4 with aspnet_regiis -i.

Windows · Reference · Solved Problems
Enabling read_committed_snapshot on an existing MSSQL database

The SQL statements that turn on snapshot isolation and read_committed_snapshot for an existing SQL Server database.

Windows · Reference · Solved Problems
Typing the escape character ^] on a non-english keyboard

How to type the telnet escape character ^] on a Norwegian or other non-English keyboard: press Ctrl + 5.

Linux · Reference · Solved Problems
Removing VMware Player or workstation when the Hyper-V role is active

How to uninstall VMware Player or Workstation when the Hyper-V role blocks the uninstaller, by editing bootstrap.lua.

Windows · Reference · Solved Problems
Make exim4 on Debian respect .forward and /etc/aliases when using a smarthost

How to make exim4 on Debian apply /etc/aliases and ~/.forward to outgoing mail when it sends through a smarthost.

Howto's · Linux · Solved Problems
Samba servers show up slowly in Network Neighborhood when VMware is installed

How to make Samba servers show up quickly in Network Neighborhood when VMware network adapters are installed.

Windows · Solved Problems
Resetting an Aeon Labs Z-Stick S2

How to reset an Aeon Labs Z-Stick S2 Z-Wave adapter with the Danfoss ZWave PC Controller, with the manual, driver and firmware.

Windows · Solved Problems · Software
Reverse SSHFS mounts (fs push)

How to mount a file system on a remote machine with sshfs, started from the machine that holds the files, using dpipe and sshfs slave mode.

Howto's · Linux · Solved Problems
regedit access denied

How to edit protected registry keys that give Access Denied even to administrators, by running regedit as SYSTEM with psexec.

Windows · Solved Problems
Removing a WIFI-network in Windows 8

How to list and delete stored WiFi network profiles in Windows 8 with netsh.

Windows · Reference · Solved Problems
Shrinking a vmdk with VMware Player

How to shrink a VMware virtual disk from the command line with VMwareToolboxCmd.

Linux · Reference · Solved Problems

2013

Logging out of a samba file server

How to clear Windows' cached network credentials with net use after a samba password change gives "access denied".

Windows · Solved Problems
Mysterious IGMP Query Request packets from 0.0.0.0 to 224.0.0.1

Why a Linux bridge sends IGMP queries from 0.0.0.0 to 224.0.0.1 every two minutes, and how to turn off multicast_snooping to stop them.

Linux · Solved Problems
How to prevent ssh -X from hanging on exit when dbus is used

How to stop ssh -X from hanging on exit when the remote program starts dbus, by launching dbus yourself and killing it afterwards.

Linux · Reference · Solved Problems
Enable username and password in URL in Internet Explorer

How to re-enable usernames and passwords in URLs (http://user:pass@host/) in Internet Explorer through a FeatureControl registry key.

Windows · Solved Problems
Disable UAC in Windows 8

How to disable UAC in Windows 8 through secpol.msc or, on non-pro editions, the EnableLUA registry value.

Windows · Reference · Solved Problems

2012

XP Windows Update error 0x8024400A solution

How to fix Windows Update error 0x8024400A on Windows XP by installing Service Pack 3.

Windows · Reference · Solved Problems
Linux on Mac Mini - power on after power loss

How to make a Mac Mini running Linux power on again after a power loss, with the command for each Mac Mini model.

Linux · Solved Problems
gitolite: 'foo' does not appear to be a git repository - ForceCommand

Why gitolite says a repository does not exist when sshd's ForceCommand or a second ssh key overrides its command= setting in authorized_keys.

Linux · Solved Problems

2011

Fixing "shmget() failed: No space left on device"

How to clean up shared memory segments left behind by killed x11vnc processes, with a root cron script that reports who left them.

Linux · Solved Problems
SSH in a while loop - stdin problems

Why ssh inside a while read loop only runs once, because ssh consumes stdin, and how the -n option fixes it.

Linux · Reference · Solved Problems
GCC stray X in program

How to fix GCC's "stray in program" error caused by invalid characters in source code, from building the Intel EMGD driver.

Linux · Reference · Solved Problems
bash time limit on commands

How to put a time limit on a command using only the shell, with a script based on the pixelbeat.org timeout script.

Howto's · Linux · Solved Problems
Remote desktop does not support colour depth 24; falling back to 16

How to enable 24-bit colour for RDP connections to Windows XP through Group Policy, so rdesktop stops falling back to 16-bit.

Howto's · Windows · Solved Problems

2010

What's touching that config file?!

How to find which Debian package's maintainer script changes a config file, by grepping the postinst scripts in /var/lib/dpkg/info.

Linux · Reference · Solved Problems
Putty keeps disconnecting

How to stop PuTTY SSH sessions from dropping on unstable connections by raising the TCP retransmission limits in the Windows registry.

Windows · Solved Problems
Windows XP activation doesn't pop up after repair or ghost

How to get into Windows XP when activation will not start after a repair or ghosting, and fix it with a hotfix and Internet Explorer 8.

Howto's · Windows · Solved Problems
Error -6003 during Creative X-fi driver install

How to fix InstallShield error -6003 during the Creative X-Fi driver install by removing a numbered RunTime folder.

Windows · Solved Problems

2009

Fixing Windows Update errors

A batch file that re-registers the crypto DLLs and resets catroot2 and SoftwareDistribution to fix Windows Update errors.

Windows · Solved Problems

2008

Error "Need to reboot the computer" after running Adobe Update Manager

Steps to clear the "Need to reboot the computer" error that Adobe Update Manager keeps showing.

Solved Problems
GPG Error: The following signatures were invalid

A tip for the APT error "The following signatures were invalid" when a transparent proxy is in the way.

Linux · Solved Problems
CIFS VFS No response for cmd n mid...

How to stop CIFS mounts from hanging with "No response for cmd" errors by disabling opportunistic locking.

Linux · Solved Problems
Hardware clock fix for Debian on Mac Mini

How to stop the hardware clock on a Mac Mini running Debian from moving back an hour each boot, with the --directisa option.

Linux · Solved Problems
VMWare mouse problems - mouse stuck in bottom right corner

How to fix a VMware guest mouse stuck in the bottom right corner after a conversion from Virtual PC.

Solved Problems