{"id":515,"date":"2006-07-13T20:29:26","date_gmt":"2006-07-14T01:29:26","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/hoanga\/2006\/07\/13\/sudo-can-break-if-you-sync-your-system"},"modified":"2006-07-13T20:29:26","modified_gmt":"2006-07-14T01:29:26","slug":"sudo-can-break-if-you-sync-your-system-clock-time-on-ubuntu","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/hoanga\/2006\/07\/13\/sudo-can-break-if-you-sync-your-system-clock-time-on-ubuntu\/","title":{"rendered":"sudo can break if you sync your system clock time on Ubuntu"},"content":{"rendered":"<p><a name='a633'><\/a><\/p>\n<p>\n Well I got hit by this bug and it&#8217;s really annoying.  On reboot of a<br \/>\n Linux box I&#8217;m working with I noticed the system clock was majorly skewed.<br \/>\n Since I wasn&#8217;t running anything really critical, I decided to update the time<br \/>\n via ntpdate so all the system clock would &#8216;right&#8217; itself out.  Then I get<br \/>\n the following when I try to sudo\n <\/p>\n<p>\n <em><br \/>\n $ sudo ls<br \/>\n sudo: timestamp too far in the future: <br \/>\n <\/em>\n <\/p>\n<p>\n Wonderful.  If you don&#8217;t already have &#8216;root&#8217; access in Ubuntu you can&#8217;t<br \/>\n sudo to get to root so you&#8217;re stuck.  If your clock was running too fast<br \/>\n and you synced it back to the right time it should be possible to wait until<br \/>\n the &#8216;right&#8217; time if it&#8217;s not too unreasonable a wait.  OR if you have<br \/>\n root you can do this:\n <\/p>\n<p>\n <em><br \/>\n # rm -r \/var\/run\/sudo\/<br \/>\n <\/em>\n <\/p>\n<p>\n This clears out the cache for your userid that sudo keeps so you can sudo again.<br \/>\n Yet another example of something that looks well in a secure sense can<br \/>\n cause weird breakage way way down the line.\n <\/p>\n<p>\n <a href=\"http:\/\/www.ubuntuforums.org\/showthread.php?t=173505\">A helpful<br \/>\n forum thread about this problem in Ubuntu<\/a>\n <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well I got hit by this bug and it&#8217;s really annoying. On reboot of a Linux box I&#8217;m working with I noticed the system clock was majorly skewed. Since I wasn&#8217;t running anything really critical, I decided to update the time via ntpdate so all the system clock would &#8216;right&#8217; itself out. Then I get [&hellip;]<\/p>\n","protected":false},"author":704,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1212],"tags":[],"class_list":["post-515","post","type-post","status-publish","format-standard","hentry","category-tagme"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts\/515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/users\/704"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/comments?post=515"}],"version-history":[{"count":0,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts\/515\/revisions"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/media?parent=515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/categories?post=515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/tags?post=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}