question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sudo vs real root

See original GitHub issue

Hi, this is not really an “issue”, but rather, a question…

If I run: tzupdate -a 64.37.57.114

Answer is: Set system timezone to America/New_York.

Cool thing is, tzupdate also changed the time on my system!

date
Sun Jan 14 22:41:19 EST 2018

But, if I run tzupdate as regular, non-root user, using sudo: sudo tzupdate -a 64.37.57.114

Answer is: Set system timezone to America/New_York.

Which is what I want, but running the date command shows:

date
Mon Jan 15 03:42:48 UTC 2018

Why is it? Why is it NOT updating the time, when run through sudo?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
eriktuxcommented, Jan 16, 2018

It works! Thank you so much. I’ve been banging my head on the wall for a while, because of this 😉

1reaction
cdowncommented, Jan 16, 2018

Yeah, having TZ set to UTC will do that.

It’s probably set somewhere in your bash profile/rc, or the global one. There are some tips on finding out where it may have came from here: https://unix.stackexchange.com/q/813/10762

For now, you can also do unset TZ; date.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sudo vs root; any actual differences? - Super User
It depends how fine grained you want the root access to be. If you have several users that perform different tasks ...
Read more >
Difference between sudo user and root user [closed]
Executive summary: "root" is the actual name of the administrator account. "sudo" is a command which allows ordinary users to perform ...
Read more >
What is the difference between a root user and a Sudo ... - Quora
Nothing about your question makes sense: root is the admin, while sudo is used by users, and root has no need for sudo...
Read more >
Exploring the differences between sudo and su commands in ...
sudo lets you issue commands as another user without changing your identity · You need to have an entry in /etc/sudoers to execute...
Read more >
What is sudo / root? - TransIP
Using the root user instead of the regular account with the sudo command brings additional security risks. Imagine forgetting to lock your computer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found