amidaware / rmmagent

Tactical RMM Agent
https://github.com/amidaware/tacticalrmm
Other
132 stars 76 forks source link

hostname for macs show FQDN #21

Open bbrendon opened 2 years ago

bbrendon commented 2 years ago

hostname in TRMM GUI table shows : sarahs-imac.local

Some stuff from the mac CLI.

bash-3.2# hostname
sarahs-imac.local
bash-3.2# hostname -f
sarahs-imac.local
bash-3.2# hostname -s
sarahs-imac
bash-3.2#     
silversword411 commented 2 years ago

Is this a question, statement, or request?

bbrendon commented 1 year ago

Here is another crazy hostname that appears.

jnguyen-macbook-pro.domain.com.beta.tailscale.net
wh1te909 commented 1 year ago

what is your request, to have trmm shorten the hostname? I think instead you should change the hostname on the mac that way trmm will report whatever you have set

bbrendon commented 1 year ago

By default mac seems to append .local or often times the search domain to the hostname.

My request is to show only the hostname and not the FQDN that the OS reports. So something like

hostname = hostname.split(".")[0]
silversword411 commented 1 year ago

It's not TRMMs job to arbitrarily change hostnames otherwise we couldn't rely on TRMM collecting and reporting accurate data.

I think the .local is part of macs goofy smb stack and bonjours advertising so they're DNS compliant and Dnsmasq can handle name resolution better.

Fix the Mac.