commit 314f6cf7f81267b3e7de73a742bff917cf5f393f Author: Ivan Godwin Date: Tue Jul 7 11:54:50 2026 -0700 Initial runbook repo: Open Dental SMB credential fix + conventions - README: purpose, hand-typeable fetch usage, naming + placeholder conventions - CONTRIBUTING: public-repo sanitization rule (procedures only, no particulars) - _template.ps1: iex-safe script convention (Read-Host, no param, admin check) - od-smb-cred.md: Open Dental SMB stored-credential fix - cg-disable.ps1: standalone Credential Guard disable + reboot Co-Authored-By: Claude Opus 4.8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b438fee --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# Contributing (note-to-self) + +Solo-maintained. This file exists to keep future-me honest. + +## The rule + +**Procedures only. No particulars.** + +This repo is public-read. Anything that identifies a client or would let a +reader act against a client environment goes to the private tier — **no +exceptions.** + +Never commit: + +- Client / business names, site identifiers +- Hostnames, IPs, subnets, SSIDs, MAC addresses +- Usernames, account names, email addresses +- Passwords, keys, tokens, connection strings, license keys +- Screenshots, exports, logs, or config dumps containing any of the above + +Instead use placeholders: ``, ``, ``, ``, +``, ``. Filled-in versions live in the **private tier** +(private repo or Bitwarden secure note). + +## Where things go + +| Content | Home | +|---|---| +| Generic procedure with placeholders | **This repo** | +| Anything needing a credential | Private tier | +| Client-specific config / values | Private tier | +| Any identifying detail | Private tier | + +If a step can't be written without a real particular, it doesn't belong here — +split the particular out to the private tier and reference it as a placeholder. + +## Before every commit + +1. Re-read the diff. Would a stranger learn *who* the client is, or *how to + reach* their systems? If yes, stop. +2. No real hostnames/IPs/users/passwords — placeholders only. +3. No screenshots or pasted output with real data. +4. Scripts prompt for client-specifics at run time; they don't hard-code them. + +## Scripts + +Follow [`_template.ps1`](_template.ps1): + +- Prompt for placeholders with `Read-Host` — no editing before running, no + `param()` (can't pass args through `irm | iex`). +- Safe to run via `irm | iex` from our own server. +- Confirm before anything destructive or that reboots. +- Check for admin explicitly (`#Requires` is not enforced under `iex`). diff --git a/README.md b/README.md new file mode 100644 index 0000000..22968ee --- /dev/null +++ b/README.md @@ -0,0 +1,70 @@ +# rb — runbooks + +Generic, reusable IT procedures and scripts for MSP field work. Fetched onto +client workstations during on-site work with short, hand-typeable commands. + +> [!WARNING] +> **This repository is PUBLIC-READ.** It must never contain client-identifying +> information — no client names, hostnames, IPs, usernames, credentials, or +> screenshots. Procedures with placeholders **only**. See +> [CONTRIBUTING.md](CONTRIBUTING.md) for the sanitization rule. + +## Using a runbook + +Fetch and read on the target workstation: + +```powershell +irm https://gitea.ivangodwin.com/ops/rb/raw/branch/main/ | more +``` + +Run an executable runbook script directly: + +```powershell +irm https://gitea.ivangodwin.com/ops/rb/raw/branch/main/.ps1 | iex +``` + +Scripts prompt for anything client-specific via `Read-Host` — nothing to edit +before running. See [`_template.ps1`](_template.ps1) for the convention. + +## Naming + +Flat repo, short filenames, light category prefixes so URLs stay +hand-typeable: + +| Prefix | Domain | +|---|---| +| `win-` | Windows workstation / server | +| `m365-` | Microsoft 365 / Entra | +| `od-` | Open Dental | +| `net-` | Networking | +| `_` | Meta / templates (not a runbook) | + +## Placeholder conventions + +Fill these from the private tier (private repo or Bitwarden secure note) at +run time — never commit filled-in values. + +| Placeholder | Meaning | +|---|---| +| `` | Client / site identifier | +| `` | Server hostname | +| `` | Share name | +| `` | Local account used for share access | +| `` | End-user account | +| `` | From password manager — never written to a file | + +## Contents + +| File | Purpose | +|---|---| +| [`od-smb-cred.md`](od-smb-cred.md) | Open Dental SMB share — stored-credential fix | +| [`cg-disable.ps1`](cg-disable.ps1) | Disable Credential Guard, then reboot (prompts to confirm) | + +## Tiers + +- **This repo (public):** generic procedures, placeholders only. +- **Private tier:** filled-in, client-specific versions — private repo or + Bitwarden secure notes. Never here. + +This repo also serves as the raw source for Intune remediation scripts and as +documented-procedures evidence for E&O / cyber insurance. diff --git a/_template.ps1 b/_template.ps1 new file mode 100644 index 0000000..4fcd3e3 --- /dev/null +++ b/_template.ps1 @@ -0,0 +1,60 @@ +<# +.SYNOPSIS + One-line description of what this runbook script does. + +.DESCRIPTION + Longer context: symptom it addresses, what it changes, whether it reboots. + +.NOTES + Convention for scripts in this repo — designed to run via: + irm https://gitea.ivangodwin.com/ops/rb/raw/branch/main/.ps1 | iex + + Because `irm | iex` runs in the caller's session: + - No param() block — you can't pass args through the pipe. Prompt with + Read-Host instead. + - #Requires is NOT enforced under iex — check for admin manually below. + - Keep it self-contained: no external module installs, no dot-sourcing. + + PUBLIC REPO: placeholders only. Never hard-code a client, host, user, or + secret. Prompt for them at run time. +#> + +$ErrorActionPreference = 'Stop' + +# --- Admin check (do not rely on #Requires under iex) --- +$isAdmin = ([Security.Principal.WindowsPrincipal] ` + [Security.Principal.WindowsIdentity]::GetCurrent() + ).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) +if (-not $isAdmin) { + Write-Warning 'This script needs an elevated PowerShell session. Re-run as Administrator.' + return +} + +Write-Host '==