smb-credential
Manage stored Windows SMB share logins: list, fetch, store, or delete credentials used to open UNC paths on a target host.
Instructions
dbabrain common.cli smb-credential: A Windows share and the login to it - what to list, fetch, delete, or store the login for.
Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line.
Request fields (pass them as request):
host: The machine sharing it: //host/share. Every command but smb-credential.
share: The share's name on that host.
username: The login. A domain before it (DOMAIN, then a backslash, then the user) is split off, as Windows writes it. The caller resolves it - common.cli reads no configuration.
password: The login's password. Never on a command line: smbclient reads it from a file this command writes 0600 and deletes.
domain: The login's domain, when not part of username.
backend: smbclient | unc. Default: unc on Windows (the share's own path, after cmdkey), smbclient elsewhere.
timeout_seconds: The whole call. Default 600 for a listing or a delete, 3600 for one file.
path: smb-list: the folder under the share to list; empty = the share's root.
recurse: smb-list: into subfolders (default true).
suffixes: smb-list: only file names ending in one of these, case-insensitive (e.g. [".bak", ".trn"]).
remote_path: smb-get: the file under the share, backslash- or slash-separated.
local_path: smb-get: the file to write on this node; its folder is created.
paths: smb-delete: the ONE file to delete, under the share - a list of exactly one path, never a pattern or a folder; two or more are refused.
force: smb-delete: must be true - a share has no host to hash a file on, so this is the forced delete of one stray file.
target: smb-credential: the host whose UNC paths the stored login opens.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "smb-credential"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |