Zagreus Hades
Zagreus Hades3w ago

Help disabling auto time sync in Kali

So I need to sync time with the Kerberos domain controller in order to interact with it, and I use sudo ntpdate dc.htb, and it works for around 2 or 3 seconds before it resets the time. I tried disabling services like timedatectl and chrony and can confirm that they are inactive, but the issue persists.
17 Replies
echotango
echotango3w ago
Are you using VirtualBox, by chance?
_null
_null3w ago
Let the troubleshooting begin. Check for other ntp services: sudo systemctl list-units --type=service | grep ntp Are you baremetal? Immediately after the sync try updating the hardware clock: sudo hwclock --systohc This can work in virtual machines sometimes, but mileage will vary. You may have to look up how your virtual machine platform handles hardware clocks. I think I remember having this problem with a box. I can't for the life of me recall what I ended up doing to fix it. Try checking the logs to see what is causing the reset. sudo journalctl -xe | grep -i "time" dmesg | grep -i "time" If all else fails, you could try to get hacky and constantly have it update the time: while true; do sudo ntpdate -u dc.htb; sleep 3; done Try to keep track of what you tried and what you learned, it will help us get there.
Zagreus Hades
Zagreus HadesOP3w ago
I am, yes Other ntp services disabled, but I'll check again. It's a vm, not baremetal. Will check the logs. I tried the shell script too. It updates the time properly for the first one or two tries, but after that it starts displaying an error message (something about ntpdig not finding any servers.)
Zagreus Hades
Zagreus HadesOP3w ago
@_null direct terminal output for all the troubleshooting methods mentioned
w33t
w33t3w ago
If you're doing the latest season box, just sync with the DC lol
Zagreus Hades
Zagreus HadesOP3w ago
That's the problem, I can't Ntpdate works for like two or three seconds and syncs to the DC, and then the system yeets it back to the previously set time This happens consistently across reinstallations and reboots
w33t
w33t3w ago
That's what I did and got the tgt
Zagreus Hades
Zagreus HadesOP3w ago
Yeah I observed it, there's exactly a two or three second delay before my system resets the time and de-syncs it from the DC it takes more than three seconds to get the TGT for me, so as of now I can't do it till I fix the time
w33t
w33t3w ago
Did you try this: timedatectl set-ntp 0
Zagreus Hades
Zagreus HadesOP3w ago
Nope, I'll try it now one sec
┌──(root㉿kali)-[/home/kali/frizz]
└─# timedatectl set-ntp 0
Failed to set ntp: NTP not supported
┌──(root㉿kali)-[/home/kali/frizz]
└─# timedatectl set-ntp 0
Failed to set ntp: NTP not supported
_null
_null3w ago
try sudo vmware-toolbox-cmd timesync disable it looks like it keeps changing it back in your logs
echotango
echotango3w ago
That happened to me a while back - it's a VirtualBox thing where Guest Additions continuously syncs the guest VM's time with the host's. Running this on my host disabled the time sync feature: vboxmanage setextradata "<VM_NAME>" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
_null
_null3w ago
its definitely your virtualization platform, whatever it may be
Zagreus Hades
Zagreus HadesOP3w ago
oh I had forgotten to unmask and start systemd-timesync or whatever Thanks! It worked perfectly now See, funny thing... ChatGPT told me this and I tried it, but as soon as I did, my VM refused to start :bigkek: so I assumed it was bs and undid the change
_null
_null3w ago
I could tell timedatctl wasn't running from the error you got, but I didn't know it supersedes all the others. Glad you figured it out.
Zagreus Hades
Zagreus HadesOP3w ago
15 hours of this went in troubleshooting the damn time lmao
No description
Zagreus Hades
Zagreus HadesOP3w ago
Thanks again, now I know what to do next time this happens

Did you find this page helpful?