/skills:samba-active-directoryfrom skills
Use when setting up or running Samba as an AD domain controller or SMB file server — samba-tool domain provision, Kerberos and DNS backends, FSMO, SYSVOL replication, GPO, joining Windows or Linux clients, share ACLs and VFS, idmap, Windows software deployment.
Ships in skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Samba 4 is the only open-source, production-ready alternative to Windows Server AD: LDAP directory, Kerberos KDC, DNS, GPO storage, FSMO. A host runs in exactly one of four mutually exclusive modes (set via server role or at provisioning time).
Rule of thumb: DC ≠ file server. File servers belong on a domain member, never on the DC. The DC runs the all-in-one daemon samba — and not smbd/nmbd/winbindd; a member starts exactly the opposite, smbd/nmbd/winbindd and never samba. This is the most common mix-up.
server role | Role | Service | When |
|---|---|---|---|
active directory domain controller | Provides the domain (LDAP, KDC, DNS, SYSVOL, GPO, FSMO). | samba | Heart of the domain. |
member server | Domain member, serves file/print, uses domain users for ACLs. | smbd+nmbd+winbindd | The place for file servers. |
standalone server | File/print without a domain, local passdb. | smbd+nmbd | Standalone setup, guest share. |
classic primary domain controller | NT4 model (no Kerberos/LDAP). | — | Obsolete. Only samba-tool domain classicupgrade for migration. Do not set up new. |
Fresh OS install, static IP outside the DHCP pool, clean /etc/hosts (FQDN+short name → LAN IP, not 127.0.0.1), systemd-resolved/resolvconf auto-override off. Remove the packaged smb.conf first.
mv /etc/samba/smb.conf /etc/samba/smb.conf.initial # otherwise provision fails
samba-tool domain provision \
--server-role=dc \
--use-rfc2307 \
--dns-backend=SAMBA_INTERNAL \
--realm=AD.EXAMPLE.COM \
--domain=EXAMPLE \
--adminpass='…' \
--option="interfaces=lo eth0" --option="bind interfaces only=yes"
--realm = Kerberos realm/DNS zone in UPPERCASE (AD.EXAMPLE.COM). Cannot be renamed after provisioning — choose carefully. No .local (collides with mDNS/Avahi). Never the public top-level domain, always a dedicated subdomain.--domain = NetBIOS name ≤ 15 characters, one word, no dot.--dns-backend = SAMBA_INTERNAL (default, works out of the box, forwarder via dns forwarder=) or BIND9_DLZ (only if AXFR/views/DNSSEC/split-horizon are needed). NONE/BIND9_FLATFILE are unsupported. Switchable at any time: samba_upgradedns --dns-backend=….--use-rfc2307 = always set (uidNumber/gidNumber in the schema; prerequisite for the Unix-attributes tab and idmap ad). Retrofitting = manual schema work.--function-level, --adminpass etc. — details in references/provisioning.md.Afterwards: copy the krb5.conf generated by Samba to the OS location (no symlink — private/ is root-only since 4.7), set /etc/resolv.conf to nameserver <DC-IP> + search ad.example.com, then start samba. Time is Kerberos-critical (tolerance 5 min): chrony/ntpd with ntpsigndsocket /var/lib/samba/ntp_signd/ for signed NTP replies to Windows clients.
Basic checks:
samba-tool domain info 127.0.0.1
samba-tool domain level show
host -t SRV _ldap._tcp.ad.example.com. # the DC must answer
smbclient -L localhost -N # must show sysvol + netlogon
kinit administrator # Kerberos ticket
Without working SRV records (_ldap._tcp, _kerberos._udp) no client finds the domain — the DC becomes the DNS resolver of all joined clients.
samba-tool covers almost everything headless:
samba-tool user create <name> / setpassword / disable / list
samba-tool group add / addmembers <grp> <user1>,<user2>
samba-tool computer / ou create OU=…
samba-tool dns add <dc> ad.example.com <name> A <ip> -U administrator
samba-tool fsmo show # 5 roles; transfer|seize --role=…
samba-tool gpo listall / create "Name" / backup <GUID> / admxload
samba-tool ntacl sysvolcheck / sysvolreset # fix NT ACLs on SYSVOL
samba-tool domain passwordsettings show
From a domain-joined Windows client (Pro/Enterprise) the RSAT tools work seamlessly, since Samba stores a real AD schema: ADUC (users/groups/OUs/Unix tab), GPMC (GPOs — the GPO editor runs only on Windows, the CLI can only save/link), DNS Manager, Sites & Services. Fill the ADMX Central Store with samba-tool gpo admxload.
From the 2nd DC on, do not provision, join:
samba-tool domain join ad.example.com DC -U administrator \
--dns-backend=SAMBA_INTERNAL --option='idmap_ldb:use rfc2307 = yes'
samba-tool drs showrepl # LDAP replicates automatically via DRS
The gap: DRS replicates the LDAP DB automatically, but NOT SYSVOL — Samba has no DFS-R/FRS. With multiple DCs, SYSVOL/GPOs drift apart.
Workaround — sync SYSVOL from the "leading" DC via a systemd timer, carry the ACLs along, then run sysvolreset:
rsync -aAX --delete /var/lib/samba/sysvol/ dc2:/var/lib/samba/sysvol/ # --acls/xattr!
ssh dc2 samba-tool ntacl sysvolreset
osync/unison for bidirectional, equal-rights DCs. Irrelevant with one DC — only needed from the second one on (failover). See references/provisioning.md.
Join first, then shares. Why not on the DC: SMB signing is enforced there, only acl_xattr (no POSIX ACLs), and the idmap config lines have no effect.
net ads join -U administrator # classic (winbind stack) — for file servers
smb.conf (member file server), core:
[global]
security = ADS
workgroup = EXAMPLE
realm = AD.EXAMPLE.COM
idmap config * : backend = tdb
idmap config * : range = 3000-7999
idmap config EXAMPLE : backend = rid
idmap config EXAMPLE : range = 10000-999999
winbind use default domain = yes
vfs objects = acl_xattr
map acl inherit = yes
[data]
path = /srv/samba/data
read only = no
vfs objects = acl_xattr shadow_copy2 recycle
Mount the filesystem with acl,user_xattr. vfs_acl_xattr stores the full Windows NT ACL in security.NTACL → permissions can be set 1:1 from Explorer.
VFS modules (order matters): shadow_copy2 = "Previous Versions" tab (maps snapshots to VSS), recycle = server-side recycle bin, fruit = macOS/Time Machine, full_audit = access logging. Pitfall: vfs objects = recycle alone switches off the defaults → explicitly dfs_samba4 acl_xattr recycle.
idmap backend — which one when:
| Backend | How | When |
|---|---|---|
rid | UID/GID algorithmically from RID+offset, deterministic, identical on every member, no AD write access. | Default for a small setup. |
autorid | like rid, ranges assigned automatically per domain. | Multi-domain/trust. |
ad | UID/GID read from RFC2307 attributes (uidNumber) in AD, maintained manually. | IDs exactly identical everywhere + NFS interop / control shells in AD. |
Ranges must never overlap; * always via tdb. Full share/ACL details: references/fileserver.md.
realm join ad.example.com -U administrator (uses SSSD) or net ads join (winbind). Rule of thumb: host is also a Samba file server → winbind (SMB needs the SID mappings). Pure login host (SSH) → SSSD is more convenient (caching, offline login). Configure NSS/PAM accordingly (passwd: files winbind or sss).Two separate concepts: (1) app streaming (app runs on the server, client sees a window) vs. (2) distribution (defined centrally, installed locally on each client). Decision table:
| Way | Type | Prerequisite | Cost | Fit | Samba DC? |
|---|---|---|---|---|---|
| winget / Chocolatey via GPO startup script | (2) | Domain, script in SYSVOL | free | ●●● | Yes, recommended. The GPO only delivers the script, the package manager runs locally, covers arbitrary .exe/Store apps. |
| GPO Software Installation (MSI) | (2) | Domain, MSI on a share | free | ●○○ | Yes, but .msi only (no .exe), slow, brittle — fallback only. |
| PDQ Deploy & Inventory | (2) | Windows host for the console | ~$1,950/year | ●●○ | Yes (needs no domain). Most comfortable way for (2), price is the catch. |
| RDS / RemoteApp | (1) | Windows Server + RDS CALs | expensive (CALs on top) | ●●○ | Server must be Windows; RDS authenticates against Samba AD though. Only option that fulfils (1) literally. |
| Kasm Workspaces CE | (1) | Docker host | free (≤5 sessions) | ●●● Linux/browser, ●○○ Win GUI | Independent of the DC. Free streaming alternative for Linux/web apps. |
| Apache Guacamole | Gateway | Docker + RDP/RemoteApp backend | free | ●●○ | Browser frontend; delivers no app itself, needs RDS or xrdp behind it. |
Key point: For the 80% case winget/Choco via GPO is enough — free, fully Samba-compatible. Only RDS needs a real Windows Server licence + CALs (the one cost trap). A Windows client OS allows only one RDP session (no legitimate RemoteApp). Additionally: home shares + drive mapping via GPO, folder redirection, FSLogix profiles (any SMB share, so Samba too). Full option matrix + phased recommendation: references/software-deployment.md.
.local. NetBIOS ≤ 15 characters.host network mode. Always a dedicated VM.bookworm-backports provides 4.22.6, Debian 13 = 4.22.x, or SAMBA+/SerNet packages. Run a DC only on a maintained series.CVE-2025-10230 (WINS hook, CVSS 10.0) only with wins support=yes+wins hook → do not enable WINS at all. SMB1 off (default since 4.11), LDAPS/RPC signing on.| Topic | File |
|---|---|
| Provision parameters, DNS backend comparison, Kerberos/FSMO/SYSVOL/time, functional level, multi-DC + SYSVOL rsync recipe, backup/restore | references/provisioning.md |
Complete member smb.conf, POSIX vs. NT ACLs, all VFS modules, idmap in depth, home shares/roaming/FSLogix, client join (winbind vs SSSD) | references/fileserver.md |
| Full option matrix (A1–D3), phased recommendation phases 0–3, cost traps, Windows client 1-session limit | references/software-deployment.md |
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (getty/skills) — no native marketplace selected
npx claudepluginhub p/getty-skills129 skills in this plugin
/ai-playable-gamesUse when building a game or simulation that bots or LLM agents must play — observation and order interface, agent API or MCP server, AI seats beside humans, fog of war, replays; or when an AI player cheats, stalls, misreads the state or follows text other players wrote./ai-web-scrapingUse when scraping, crawling or extracting structured data from websites, especially with an LLM — Crawl4AI, Firecrawl, Scrapy, Crawlee, Playwright, browser-use; building a dataset or RAG corpus, watching pages for changes, or a scraper that returns empty, duplicated or invented records./cedar-engineeringUse when writing, validating or debugging Cedar authorization policies — .cedar and .cedarschema files, permit/forbid, entities and hierarchies, RBAC/ABAC/ReBAC, templates, multi-tenant access, partial evaluation, Amazon Verified Permissions, migrating to or from Cedar./cel-engineeringUse when writing, embedding or debugging Common Expression Language (CEL) — type environments, macros, missing fields, errors and unknowns, cost limits, Kubernetes x-kubernetes-validations and ValidatingAdmissionPolicy, Envoy, Google Cloud IAM Conditions./cisco-ios-routerUse when reading, auditing or changing a classic Cisco IOS 15.x router (ISR 900/1900/2900/3900, 800 series, c900-universalk9) — interfaces and SVIs, ACLs, NAT and port forwards, zone-based firewall, IP SLA failover, SSH hardening, licences, config rollback, IOS upgrades; IOS-XE differences noted./cisco-small-business-switchUse when configuring or auditing a Cisco Small Business switch (SG300/SF300/SG500, Sx350/Sx550, CBS250/CBS350) via CLI or web UI — VLANs and port modes, management IP, SSH users, LLDP and MAC lookups, PoE, mirroring, saving config, firmware upgrades. Not Catalyst IOS.Other plugins' skills for the same job