Skip to content

Instantly share code, notes, and snippets.

@Bedz01
Bedz01 / windows-ssh-mapped-drives.md
Created October 17, 2026 04:51
Windows: drives mapped on the desktop don't exist over SSH, even with sshd running in your own desktop session (UAC split token, EnableLinkedConnections)

Windows: drives mapped on the desktop don't exist over SSH, even with sshd running in your own desktop session (UAC split token, EnableLinkedConnections)

Saving this to save someone else the trouble, since I couldn't find it written down anywhere in one place. Correct me if I'm wrong!

The setup: Win32-OpenSSH on Windows 11 Pro, a workgroup machine (no domain), local admin account. The normal sshd service runs as SYSTEM, so key-based sessions are network logons with no credentials: no SMB, no Credential Manager, no mapped drives. To get around that I run a second sshd as the user, from a scheduled task at logon, in the user's desktop session, with "Run with highest privileges" so SSH sessions are elevated:

$Action    = New-ScheduledTaskAction -Execute 'C:\Windows\System32\conhost.exe' `
                 -Argument '--headless "C:\Windows\System32\OpenSSH\sshd.exe" -D -f "C:\Users\me\sshd-user\sshd_config"'
$Trigger   = New-ScheduledTaskTrigger -AtLogOn -User 'me'
$Principal = New-S
@Bedz01
Bedz01 / icacls-workgroup-gist.md
Created July 11, 2026 07:23
icacls / PowerShell Set-Acl cannot resolve accounts on a standalone (non-domain) Samba server

icacls / PowerShell Set-Acl cannot resolve accounts on a standalone (non-domain) Samba server(probs Windows Server as well) — no syntax fixes this

Saving this to save someone else the trouble. Correct me if I'm wrong!

If you're managing permissions on a standalone/workgroup Samba server (server role = standalone server, no AD, no domain) from a Windows client, and you hit:

No mapping between account names and security IDs was done.

...from icacls, PowerShell's Set-Acl, or .NET's [System.Security.Principal.NTAccount], you are out of luck with those tools, full stop. This is not fixable by:

@Bedz01
Bedz01 / ARES2025_openssl_linux_fix.sh
Last active October 19, 2026 10:37
ARES Commander 2025 Linux OpenSSL fix
#!/usr/bin/env bash
# ARES Commander 2025 on Linux relies on OpenSSL 1.1 which is older than what most have, so ARES can fail to get network access..
# ARES actually includes the required library version so you just need to preload it on lanuch.
cd "/opt/graebert-gmbh/ARES Commander 2025/Linux"
LD_PRELOAD="/opt/graebert-gmbh/Libraries/libssl.so" "./ARES Commander 2025"
# ARES Commander 2027 doesn't need this
@Bedz01
Bedz01 / ff-save-image-no-prompt.sh
Created November 11, 2025 06:50
Stop Firefox from asking where to save an image, and just download it -- Changes "Save Image As" to just "Save Image".
## This will stop firefox from asking where to save an image everytime you want to.. save a image.
## It will change the logic so the file just downloads into your set Downloads folder, skipping the file picker prompt.
## Optionally, the context menu text can also be changed from "Save Image As" to just "Save Image". Just remove the # on the relevant line.
## A 'backup' of the omni.ja file, called omni_original.ja, will be made before applying the edits.
## This was written for Arch Linux, but the same basic process applies to Windows, and other distros as well.
## Why on earth you need to do all this for something as simple as DOWNLOADING an image is beyond me...
## PLEASE READ ALL THE COMMANDS BELOW BEFORE RUNNING THIS SCRIPT, it's not much I promise :)