I am trying to understand the following situation: on all of my devices the busybox ntpd is running as user ntp, except one. On this device it is running as root. I have checked
- md5sum of
/etc/init.d/sysntpd - user
ntpexists
What else? What configuration can cause this?
device1 running with user ntp
root@device1:~# ubus call system board
{
"kernel": "6.12.87",
"hostname": "device1",
"system": "Qualcomm Atheros QCA9533 ver 2 rev 0",
"model": "GL.iNet GL-AR300M (NOR)",
"board_name": "glinet,gl-ar300m-nor",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "25.12.4",
"firmware_url": "https://downloads.openwrt.org/",
"revision": "r32933-4ccb782af7",
"target": "ath79/nand",
"description": "OpenWrt 25.12.4 r32933-4ccb782af7",
"builddate": "1778712129"
}
}
root@device1:~# ps | grep ntpd
3689 root 2960 S {ntpd} /sbin/ujail -t 5 -n ntpd -U ntp -G ntp -C /etc/capabilities/ntpd.json -c -u -r /bin/ubus -r /usr/bin/env -r /usr/bin/jshn -r /usr/sbin/ntpd-hotplug -r /us
3715 ntp 1424 S /usr/sbin/ntpd -n -N -l -S /usr/sbin/ntpd-hotplug -p 192.168.6.12
17985 root 1424 S grep ntpd
root@device1:~# cat /etc/config/system
config system
option ttylogin '0'
option log_size '2560'
option urandom_seed '0'
option zonename 'Europe/Berlin'
option timezone 'CET-1CEST,M3.5.0,M10.5.0/3'
option log_proto 'udp'
option conloglevel '8'
option cronloglevel '7'
option hostname 'device1'
config timeserver 'ntp'
list server '192.168.6.12'
option enable_server '1'
config led 'led_lan'
option name 'LAN'
option sysfs 'green:lan'
option trigger 'netdev'
option mode 'link tx rx'
option dev 'eth0'
root@device1:~# md5sum /etc/init.d/sysntpd
71cafa201546c2f0c45af73ac0a2fade /etc/init.d/sysntpd
root@device1:~# cat /etc/passwd | grep ntp
ntp:x:123:123:ntp:/var/run/ntp:/bin/false
root@device1:~# cat /etc/shadow | grep ntp
ntp:x:0:0:99999:7:::
root@device1:~#
device2 running with root
root@device2:~# ubus call system board
{
"kernel": "6.12.87",
"hostname": "device2",
"system": "MediaTek MT7628AN ver:1 eco:2",
"model": "GL-MT300N-V2",
"board_name": "glinet,gl-mt300n-v2",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "25.12.4",
"firmware_url": "https://downloads.openwrt.org/",
"revision": "r32933-4ccb782af7",
"target": "ramips/mt76x8",
"description": "OpenWrt 25.12.4 r32933-4ccb782af7",
"builddate": "1778712129"
}
}
root@device2:~# ps | grep ntpd
3265 root 1428 S< /usr/sbin/ntpd -n -N -S /usr/sbin/ntpd-hotplug -p 192.168.6.12
3854 root 1424 S grep ntpd
root@device2:~# cat /etc/config/system
config system
option hostname 'device2'
option ttylogin '0'
option log_size '5120'
option urandom_seed '0'
option zonename 'Europe/Berlin'
option log_proto 'udp'
option conloglevel '8'
option cronloglevel '7'
option timezone 'CET-1CEST,M3.5.0,M10.5.0/3'
config timeserver 'ntp'
list server '192.168.6.12'
config led 'led_wifi_led'
option name 'wifi'
option sysfs 'red:wlan'
option trigger 'netdev'
option mode 'link tx rx'
option dev 'wlan0'
config led 'led_wan'
option name 'wan'
option sysfs 'green:wan'
option trigger 'switch0'
option port_mask '0x1'
root@device2:~# md5sum /etc/init.d/sysntpd
71cafa201546c2f0c45af73ac0a2fade /etc/init.d/sysntpd
root@device2:~# cat /etc/passwd | grep ntp
ntp:x:123:123:ntp:/var/run/ntp:/bin/false
root@device2:~# cat /etc/shadow | grep ntp
ntp:x:0:0:99999:7:::
root@device2:~#
Is it because device2 is a target which has the small_flash flag during compilation?
