Basically, I try to get through the terminal terminal's username: username@full.name.of.activedomain.com on Windows, I can run "whoami / upn" and it will print everything. or nothing if the user is not in Active Directory. so whoami for windows works like a charm to me. On Mac, I found a command called HOSTNAME. and there is also an alias - $ HOSTNAME. if the end user is tied to Active Directory - will he display his name? in other words - I could then call this command: echo $ USER @ $ HOSTNAME to get the user principal name ...
or maybe some other command or an alias that I can use in the terminal? please, help.
active-directory macos
mailman
source share