2 issues

I am facing 2 issues:-

1- PiHole time is not in sync with DiePi. when i run “date” the DietPi has the correct date but not on the PiHole. I was told to use:
timedatectl list-timezones

to set the time but timedatectl does not seem to be on DietPi. Any help?

2- I wanted to create a new user with root privlidges so I used the command " useradd -ou 0 -g 0 (username) " then I used "passwd (username) " to se the password.

when I do “~echo (username)” it shoes its in the /home directory. When I go to the home directory and do “ls” there is only DietPi.

I tried to ssh in with that username, I enter the set password, I get "Connection to (DietPi) closed. Any idea whats going on?

Never saw that command for adduser

Usually just an adduser to create a user is needed first I believe

I have seen this one for sudoer

sudo usermod -a -G sudo <username>

Is the time on Pihole deviating some minutes or hours? Is the difference the same by any chance as your timezone with UTC?

First create a user, then add him to sudoers. Use -m to have the home directory created from skel.

timedatectl should be available as part of systemd package. However it require dbus package to run. Check if dbus was already installed

dpkg -l dbus

If needed just install via apt

apt update
apt install dbus

Anyway timedatectl list-timezones doesn’t do anything except listing down all available time zone. If you need to change time zone, use dietpi-config pls. There you can set required time zone. Checking actual time zone can be done as well by running

ls -l /etc/localtime

Anyway there are not much reason why a single application is running on a different time than system. But as trendy already ask, what is the time difference? Full hours? or minutes?

By default DietPi is not doing anything on PiHole configuration to have the time deviating from system clock.

Regarding the user. As stated by the other, create a new user and assign them to sudoers. Following guide is for Ubuntu, but it’s working same on Debian


thanks everyone for the replies and the help!

its about about few hours. Yes it could be the difference between my timezone and UTC!

did you tried to change time zone using dietpi-config?

yes thank, the time on the DietPi itself is correct. The problem is on the PiHole!

I’m not aware on a setting inside PiHole to set an own time zone. However you can check dedicated user time on OS level

date #should be system time if executed as root
sudo -u pihole date
sudo -u www-data date

It should return same time for all 3 users

After much observation I think the PiHole has the correct time it just display it on UTC