logname
Return the original login name of the current user, even after using su or sudo. Identifies the initial session owner.
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. |