logs/logins
List Linux login history or failed login attempts, filter by username and recent entry count for audits or troubleshooting.
Instructions
Lists login history (wraps last) or failed login attempts (type: "failed", wraps lastb). Read-only; returns raw text, not JSON. limit keeps the N most recent entries and user filters by username; the trailing wtmp begins... summary line is dropped and an empty history returns an empty line. last/lastb must be installed on the host. For account details use users/list, for authentication messages logs/journal-control.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | "success" (default, wraps `last`) or "failed" (wraps `lastb`) | |
| user | No | Only return entries for this username | |
| limit | No | Only return this many most recent entries | |
| privileged | No | Run as root - typically required for type "failed". Needs a grant for this tool in mcp-sudo.yaml |