I have 2 packages with its own user added to Freetz for years. These are zabbix and ntp.
A few of my boxes became inaccessible over time because /var/tmp/passwd and /var/tmp/passwd.avm became huge.
At first I thought the boxes were hacked, but it turned out to be an anomaly....
I now have created this in startup to get rid of that:
It seems ctlmgr gets confused with the foreign entries of ntp and zabbix that look like this:
I see this behaviour only on 7.12 and 7.13
The lines containing ntp and zabbix get duplicated each time that ctlmgr starts.
I have patched the hashes before publication.
A few of my boxes became inaccessible over time because /var/tmp/passwd and /var/tmp/passwd.avm became huge.
At first I thought the boxes were hacked, but it turned out to be an anomaly....
I now have created this in startup to get rid of that:
Code:
if [ `stat -c%s /var/tmp/passwd` -gt 4000 ] ; then
echo "Sanitizing /var/tmp/passwd" >>${LOG}
rm /var/tmp/passwd-
rm /var/tmp/passwd.avm
echo 'root:x:0:0:root:/mod/root:/bin/sh' >/tmp/passwd.tmp
sort -u /var/tmp/passwd | grep -v ^root: >>/tmp/passwd.tmp
cat /tmp/passwd.tmp >/var/tmp/passwd
rm /tmp/passwd.tmp
modsave all
fi
It seems ctlmgr gets confused with the foreign entries of ntp and zabbix that look like this:
Code:
zabbix:x:100:1000:zabbix:/home/zabbix:/bin/false
ntp:x:101:1001:ntp:/home/ntp:/bin/false
I see this behaviour only on 7.12 and 7.13
The lines containing ntp and zabbix get duplicated each time that ctlmgr starts.
I have patched the hashes before publication.
Code:
root@fritz:/var/mod/root# cat /var/tmp/passwd
root:x:0:0:root:/mod/root:/bin/sh
ntp:x:100:1000:ntp:/home/ntp:/bin/false
zabbix:x:101:1001:zabbix:/home/zabbix:/bin/false
ntp:x:100:1000:ntp:/home/ntp:/bin/false
zabbix:x:101:1001:zabbix:/home/zabbix:/bin/false
boxusr11:$1$ancyluh$AeY7zRwEcbco5wRC3Cc4P1:1011:0:box user:/home-not-used:/bin/sh
boxusr11int:$1$gvfycdl$Uu43YKkcX83A./QscuLSF/:2011:0:box user:/home-not-used:/bin/sh
boxusr10:$1$ffpmcpc$x0IGSjCOTjXXrfnttmtWD/:1010:0:box user:/home-not-used:/bin/sh
boxusr10int:$1$ydcntvg$TK822zJ2Xj3U8TwCF0JeV/:2010:0:box user:/home-not-used:/bin/sh
boxusr100:$1$pmuiqcx$vuKWznXe2OmuuFSLFuQwH1:1100:0:box user:/home-not-used:/bin/sh
boxusr100int:$1$iacdflp$7XSwsAX5yU9.Uzbxmvq3D1:2100:0:box user:/home-not-used:/bin/sh
root@fritz:/var/mod/root# ctlmgr -s
root@fritz:/var/mod/root# cat /var/tmp/passwd
root:x:0:0:root:/mod/root:/bin/sh
ntp:x:100:1000:ntp:/home/ntp:/bin/false
zabbix:x:101:1001:zabbix:/home/zabbix:/bin/false
ntp:x:100:1000:ntp:/home/ntp:/bin/false
zabbix:x:101:1001:zabbix:/home/zabbix:/bin/false
boxusr11:$1$ancyluh$AeY7zRwEcbco5wRC3Cc4P1:1011:0:box user:/home-not-used:/bin/sh
boxusr11int:$1$gvfycdl$Uu43YKkcX83A./QscuLSF/:2011:0:box user:/home-not-used:/bin/sh
boxusr10:$1$ffpmcpc$x0IGSjCOTjXXrfnttmtWD/:1010:0:box user:/home-not-used:/bin/sh
boxusr10int:$1$ydcntvg$TK822zJ2Xj3U8TwCF0JeV/:2010:0:box user:/home-not-used:/bin/sh
boxusr100:$1$pmuiqcx$vuKWznXe2OmuuFSLFuQwH1:1100:0:box user:/home-not-used:/bin/sh
boxusr100int:$1$iacdflp$7XSwsAX5yU9.Uzbxmvq3D1:2100:0:box user:/home-not-used:/bin/sh
root@fritz:/var/mod/root# ctlmgr
root@fritz:/var/mod/root# cat /var/tmp/passwd
root:x:0:0:root:/mod/root:/bin/sh
ntp:x:100:1000:ntp:/home/ntp:/bin/false
zabbix:x:101:1001:zabbix:/home/zabbix:/bin/false
ntp:x:100:1000:ntp:/home/ntp:/bin/false
zabbix:x:101:1001:zabbix:/home/zabbix:/bin/false
ntp:x:100:1000:ntp:/home/ntp:/bin/false
zabbix:x:101:1001:zabbix:/home/zabbix:/bin/false
ntp:x:100:1000:ntp:/home/ntp:/bin/false
zabbix:x:101:1001:zabbix:/home/zabbix:/bin/false
boxusr11:$1$ancyluh$AeY7zRwEcbco5wRC3Cc4P1:1011:0:box user:/home-not-used:/bin/sh
boxusr11int:$1$gvfycdl$Uu43YKkcX83A./QscuLSF/:2011:0:box user:/home-not-used:/bin/sh
boxusr10:$1$ffpmcpc$x0IGSjCOTjXXrfnttmtWD/:1010:0:box user:/home-not-used:/bin/sh
boxusr10int:$1$ydcntvg$TK822zJ2Xj3U8TwCF0JeV/:2010:0:box user:/home-not-used:/bin/sh
boxusr100:$1$pmuiqcx$vuKWznXe2OmuuFSLFuQwH1:1100:0:box user:/home-not-used:/bin/sh
boxusr100int:$1$iacdflp$7XSwsAX5yU9.Uzbxmvq3D1:2100:0:box user:/home-not-used:/bin/sh
Zuletzt bearbeitet: