at the moment I logged into my mac and opened zsh and had a giant shock!
Usually my terminal immediate is one thing like:
sidharthghoshal@macbook-pro
However at the moment I discovered it was :
sidharthghoshal@HaeLims-Air
I do not know what HaeLims-Air
is and my first assumption is I had been hacked. Exploring a bit I got here throughout this publish: How do I cease my pc identify from routinely, and incorrectly, altering? .
Impressed by it I went to the terminal and ran print -P '%m'
and it printed out HaeLims-Air
so it my hostname %m
has legitimately modified.
Now after I verify my system preferences and sharing the identify of the macbook continues to be the identical because it has ever been. It’s Sidharth’s MacBook Professional
which is what I believed it ought to be.
So now I wish to ask. How can I discover out
- which recordsdata really comprise the string
HaeLims-Air
that has modified. - When did this file change?
I wish to perceive precisely when that hostname within the zsh would have been modified. Since that is the primary time in my complete life I’ve encountered this and nonetheless really feel fairly uneasy.
In a weak try I attempted to run grep -iR "HaeLim" .
from the and so forth
folder however nothing got here up.
It’s doable that is benign. I regarded up my hostname historical past and certainly there I see that solely MOST not too long ago did the host identify change:
sidharthghoshal@HaeLims-Air ~ % log present --style syslog --info --last 30d | grep 'setting hostname'
2024-01-28 16:34:51.391348-0500 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MacBook-Professional.native"
2024-01-28 16:34:54.493552-0500 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MBP.lan"
2024-01-28 17:39:07.272782-0500 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MacBook-Professional.native"
2024-01-28 17:39:09.392589-0500 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MBP.lan"
2024-01-31 11:10:27.564345-0500 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MacBook-Professional.native"
2024-01-31 11:10:37.515435-0500 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MBP.lan"
1969-12-31 19:06:20.379707-0500 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MacBook-Professional.native"
2024-02-02 19:00:06.481011-0800 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MBP.attlocal.internet"
2024-02-02 19:06:23.604979-0800 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MacBook-Professional.native"
2024-02-02 19:06:27.296765-0800 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MBP.attlocal.internet"
1969-12-31 20:03:50.582148-0800 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MacBook-Professional.native"
2024-02-06 15:50:00.336584-0800 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MBP.attlocal.internet"
1969-12-31 16:08:31.806416-0800 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "Sidharths-MacBook-Professional.native"
2024-02-06 22:00:14.072212-0800 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "HaeLims-Air"
I think that the February 06 entry given as
2024-02-06 22:00:14.072212-0800 localhost configd[82]: [com.apple.SystemConfiguration:IPMonitor] setting hostname to "HaeLims-Air"
Truly comes from my Macbook not being turned on since February 06. And thus when it turned on, earlier than the Macbook KNEW what the right date was it already was making an attempt to set the hostname. This makes quite a lot of sense as a result of till the Macbook connects to WIFI I don’t imagine it has any means of being conscious of what the time is. As a way to connet to WIFI it should get a hostname assigned.