+ Reply to Thread
Results 1 to 11 of 11
  1. Surf Guitar Guy tedjames's Avatar
    Join Date
    Jan 2014
    Location
    Surf City, TX
    Posts
    504

    Certifications
    SSCP, Security+ +4
    #1

    Default My Kali Linux is losing time

    Weirdest thing. Up until a few weeks ago, the clock on my Kali Linux installation kept perfect time. Then one day it started slowing down. I reset it only to find it had lost 12 hours by the next day. I looked up the problem, and they recommended running these two commands:

    sudo apt-get install ntpdate
    sudo ntpdate in.pool.ntp.org

    That reset the clock. And since then, I've run the second command several times, only to see it lose time again. I installed Kali Linux on Oracle VM Virtual Box over a year ago, and the clock has run fine up until now. The other tools/operations appear unaffected.

    Any idea?
    Reply With Quote Quote  

  2. SS -->
  3. Senior Member 636-555-3226's Avatar
    Join Date
    Jul 2015
    Posts
    881

    Certifications
    Lots of security certifications, yet the more I learn, the further I have to go...
    #2
    In over 20 years of working on computers I've never experienced that. If it was a physical box I'd say there's maybe a hardware problem. I've never dug into the time management in Debian (which Kali is derived from) or any other Linux box for that matter. Is there a time daemon that isn't running that should be? Maybe somehow you turned it off by accident? I only load up Kali occasionally - I don't use it for my daily driver - so I don't know if the Kali folks disable it by default or something.
    Reply With Quote Quote  

  4. Senior Member
    Join Date
    May 2006
    Posts
    2,010

    Certifications
    CISSP, CCSP, eJPT, ITIL,PA ACE,Qualys Certified Specialist, A+
    #3
    Kali has had a new release recently, in September Kali 2017.2 was released.

    Why not get a new iso and launch a new VM in Virtual Box.

    If everything is fine then your other image has probably forten some updates that are not stable.
    Reply With Quote Quote  

  5. The whole Shebang! hiddenknight821's Avatar
    Join Date
    Aug 2009
    Location
    Western NY
    Posts
    1,181

    Certifications
    BS:IT, RHCSA
    #4
    What does the output of 'timedatectl status' command give you? I'd expect "Network time on" and "NTP synchronized" to be yes.
    Reply With Quote Quote  

  6. Surf Guitar Guy tedjames's Avatar
    Join Date
    Jan 2014
    Location
    Surf City, TX
    Posts
    504

    Certifications
    SSCP, Security+ +4
    #5
    Running "timedatectl status" yields the following result:

    Local time: Sun 2017-11-26 22:06:24 CST
    Universal time: Mon 2017-11-27 04:06:24 UTC
    RTC time: Tue 2017-11-21 07:39:59
    Time zone: America/Chicago (CST, -0600)
    System clock synchronized: no
    systemd-timesyncd.service active: no
    RTC in local TZ: no


    I am running 2016.2 64-bit. Maybe I'll try installing 2017.2 on another machine and see what happens. It could be that something I did messed with the time. Just seems odd.
    Reply With Quote Quote  

  7. The whole Shebang! hiddenknight821's Avatar
    Join Date
    Aug 2009
    Location
    Western NY
    Posts
    1,181

    Certifications
    BS:IT, RHCSA
    #6
    Ok. Try running 'systemctl enable systemd-timesyncd' then 'systemctl restart systemd-timesyncd'. I hope you get both lines to become yes this time. I don't have a Kali distro to test this right now.

    EDIT: I just realized the two lines I mentioned didn't show up in your output. In your case, the line 'System clock synchronized:' and 'systemd-timesyncd.service active:' should be yes.
    Last edited by hiddenknight821; 11-27-2017 at 03:49 AM.
    Reply With Quote Quote  

  8. Senior Member TeKniques's Avatar
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    1,250

    Certifications
    OSCP, CISA, CISSP, SSCP, MCSA 2008, MCSE 2003: Security, MCDST, MCP, Security+, Network+, A+, Project+, CCENT, CCNA
    #7
    Maybe the issue is with the time sync between Virtualbox and the VM? Reinstall the guest addition tools in Kali?
    Reply With Quote Quote  

  9. Surf Guitar Guy tedjames's Avatar
    Join Date
    Jan 2014
    Location
    Surf City, TX
    Posts
    504

    Certifications
    SSCP, Security+ +4
    #8
    Thanks for the suggestions. I'll try these tonight after work.
    Reply With Quote Quote  

  10. Surf Guitar Guy tedjames's Avatar
    Join Date
    Jan 2014
    Location
    Surf City, TX
    Posts
    504

    Certifications
    SSCP, Security+ +4
    #9
    Quote Originally Posted by hiddenknight821 View Post
    Ok. Try running 'systemctl enable systemd-timesyncd' then 'systemctl restart systemd-timesyncd'. I hope you get both lines to become yes this time. I don't have a Kali distro to test this right now.

    EDIT: I just realized the two lines I mentioned didn't show up in your output. In your case, the line 'System clock synchronized:' and 'systemd-timesyncd.service active:' should be yes.
    Here's the latest:
    # systemctl enable systemd-timesyncd
    Created symlink /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service → /lib/systemd/system/systemd-timesyncd.service.

    # systemctl restart systemd-timesyncd

    # timedatectl status
    Local time: Mon 2017-11-27 17:55:24 CST
    Universal time: Mon 2017-11-27 23:55:24 UTC
    RTC time: Tue 2017-11-21 08:46:26
    Time zone: America/Chicago (CST, -0600)
    System clock synchronized: yes
    systemd-timesyncd.service active: yes
    RTC in local TZ: no

    Looks like those two lines now say yes. My time is correct again. I'll keep an eye on it and see what it looks like in a few hours.

    Thanks for the help! I'll be saving these commands for future reference. And if I ever finish eJPT, I plan to take some Linux training...
    Reply With Quote Quote  

  11. Surf Guitar Guy tedjames's Avatar
    Join Date
    Jan 2014
    Location
    Surf City, TX
    Posts
    504

    Certifications
    SSCP, Security+ +4
    #10
    Time is still accurate. Thanks again for your help!
    Reply With Quote Quote  

  12. The whole Shebang! hiddenknight821's Avatar
    Join Date
    Aug 2009
    Location
    Western NY
    Posts
    1,181

    Certifications
    BS:IT, RHCSA
    #11
    No problem! I figured it's probably one of the tools on Kali that you used that probably disabled all services, including the timesyncd service required to keep your time in sync. So when you put your computer to sleep or whatever, the VM will resume off from the time that was set before it went to sleep unlike the physical machines. A Windows VM would've done the same thing if you disable synchronization with the time servers.
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks