Univention Bugzilla – Bug 44246
univention-join sets time set via "rdate -n" but not "hwclock --systohc", which is lost after reboot
Last modified: 2020-06-22 14:58:43 CEST
After the update to UCS 4.2 I have this behavior on an Samba/AD Master root@master10:~# date Mo 23. Nov 23:54:47 CET 2015 root@master10:~# rdate -n 10.200.8.1 Mon Apr 3 19:52:53 CEST 2017 root@master10:~# reboot [...] root@master10:~# date Mo 23. Nov 23:54:57 CET 2015 So the hardware clock is not set to the system time at shutdown. Maybe we should adjust the locations where we run rdate to also sync the hardware clock to the system time: root@master10:~# hwclock --systohc
There is "/lib/systemd/system/hwclock-save.service", but as ntpd is installed on all UCS system roles, it is disabled by ConditionalFileIsExecutable. Use "ucr set timeserver=0.europe.pool.ntp.org" (or whatever) and wait for at least 11 minutes after time has been synchronized; then the Linux kernel itself will update the RTC. (if you use `rdate` by hand, you're supposed to use `hwclock --systohc --utc` by hand as well as you must know what you're doing - doing it automatically is wrong)
> (if you use `rdate` by hand, you're supposed to use `hwclock --systohc --utc` by hand as well as you must know what you're doing - doing it automatically is wrong) Well, that's the thing, we do rdate in univention-join.
Still rdate in: base/univention-ssl/debian/univention-ssl.postinst base/univention-lib/python/admember.py management/univention-join/univention-join ...