secureonelabs Posted March 9, 2017 Share Posted March 9, 2017 I may be overlooking something very obvious here. Anyone else having issues "permanently" setting the system or hardware clocks? because ntp only works when there is internet connection, I can't rely on it. I can set the time manually while logged on via serial or ssh, but as soon as the bashbunny is rebooted or recycled, it reverts back to 1969. I'm writing custom scripts and need to set the correct datetime in my log files. # This sets the timezone # dpkg-reconfigure tzdata # This sets the date # date --set 2017-03-09 # This sets the time # date --set 01:32:00 # This is supposed to sync the hardware clock to the system clock, which it does when you run it, but disappears when bashbunny is restarted # hwclock --systohc Any help would be greatly appreciated. Cheers Link to comment Share on other sites More sharing options...
Sebkinne Posted March 10, 2017 Share Posted March 10, 2017 Hi Secureonelabs, The answer is simply that the system doesn't have a RTC. Even if it did, as the device doesn't have a battery on board, it cannot keep the clock running. I am rolling in a small hack we use on the Pineapple: On system start, take a look at files on the system and set the system's time to the last changed time of these files. While that's not a totally accurate time, it fixes a lot of issues. If you need accurate log times inside your payloads, you'll need to find a way to relay the correct time back to the Bunny. Link to comment Share on other sites More sharing options...
secureonelabs Posted March 10, 2017 Author Share Posted March 10, 2017 Thank you Sebkinne, that explains things. I suspected that but didn't want to make any assumptions. No problem, i'll figure something out and share if I think it might be helpful or useful to others. Cheers, Link to comment Share on other sites More sharing options...
93K_Test_Junkie Posted February 10, 2018 Share Posted February 10, 2018 Thanks Sebkinne & Secureonelabs. I will keep chomping at the bit to figure this one out. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.