logname - display user's login name
The logname(1) utility writes the user's login name to standard output in the form domain+name, followed by a newline. Note that the domain name is always included, even if the user's domain is the same as the computer's principal domain.
The logname(1) utility explicitly ignores the LOGNAME and USER environment variables because the environment cannot be trusted.
The logname(1) utility exits 0 on success, and >0 if an error occurs.