logname
Return the original login name of the current user, bypassing su/sudo. Helps identify the initial session identity for audit trails.
Instructions
Return the original login name of the current user (unaffected by su/sudo). Read-only, no side effects. Returns JSON with the login name. Use to determine the original session identity bypassing privilege escalation. Not for the effective user ID — use 'whoami'. See also 'whoami', 'id'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Write logname without a JSON envelope. |