offensive-security / kali-arm-build-scripts

Kali Linux ARM build scripts
874 stars 374 forks source link

libnss-systemd package needed to be installed #127

Closed youngd24 closed 6 years ago

youngd24 commented 6 years ago

I have both a Pi3 and ODROID-C2 running Kali, systemd-timesyncd works on the Pi3 image but on the ODROID one I was getting:

Mar 05 16:16:38 kali-arm64 systemd-timesyncd[140]: Cannot resolve user name systemd-timesync: No such process Mar 05 16:16:38 kali-arm64 systemd[1]: systemd-timesyncd.service: Main process exited, code=exited, status=1/FAILURE Mar 05 16:16:38 kali-arm64 systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'. Mar 05 16:16:38 kali-arm64 systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart. Mar 05 16:16:38 kali-arm64 systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 1. Mar 05 16:16:39 kali-arm64 systemd-timesyncd[179]: Cannot resolve user name systemd-timesync: No such process Mar 05 16:16:39 kali-arm64 systemd[1]: systemd-timesyncd.service: Main process exited, code=exited, status=1/FAILURE Mar 05 16:16:39 kali-arm64 systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'. Mar 05 16:16:39 kali-arm64 systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart. Mar 05 16:16:39 kali-arm64 systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 2. Mar 05 16:16:39 kali-arm64 systemd-timesyncd[231]: Cannot resolve user name systemd-timesync: No such process Mar 05 16:16:39 kali-arm64 systemd[1]: systemd-timesyncd.service: Main process exited, code=exited, status=1/FAILURE

A bit of research led me to this Debian bug: https://github.com/systemd/systemd/commit/444c1915f94d7109b5fd97277b049ed17289848d

and this discussion about it: http://debian.2.n7.nabble.com/Bug-887343-systemd-timesyncd-does-not-start-with-DynamicUser-yes-td4258596.html

I installed the libnss-systemd package via apt and now timedatectl shows synced time (previously it was a no):

root@kali-arm64:~# timedatectl Local time: Sat 2018-05-12 19:17:14 CDT Universal time: Sun 2018-05-13 00:17:14 UTC RTC time: n/a Time zone: America/Chicago (CDT, -0500) System clock synchronized: yes systemd-timesyncd.service active: yes RTC in local TZ: no

And the systemd service is now working:

root@kali-arm64:~# systemctl status systemd-timesyncd ● systemd-timesyncd.service - Network Time Synchronization Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2018-05-12 19:13:19 CDT; 6min ago Docs: man:systemd-timesyncd.service(8) Main PID: 718 (systemd-timesyn) Status: "Synchronized to time server 204.9.54.119:123 (0.debian.pool.ntp.org)." Memory: 732.0K CGroup: /system.slice/systemd-timesyncd.service └─718 /lib/systemd/systemd-timesyncd

May 12 19:13:19 kali-arm64 systemd[1]: Starting Network Time Synchronization... May 12 19:13:19 kali-arm64 systemd[1]: Started Network Time Synchronization. May 12 19:13:19 kali-arm64 systemd-timesyncd[718]: Synchronized to time server 204.9.54.119:123 (0.debia

I'm guessing libnss-systemd needs to be included in the base image unless there is some other upstream fix in Systemd for it.

youngd24 commented 6 years ago

Oh, I started with the 2018.2 ODROID-C2 image.

steev commented 6 years ago

Thanks for the report - does the pi3 already have the libnss-systemd package pre-installed?

steev commented 6 years ago

Actually this looks like it was fixed already upstream (it was a Debian bug) in 238-5. Closing this, let me know if you run into this again.