use setuid insted of sudo to allow tcpping, tcptraceroute and traceroute to work as smokeping probes

This commit is contained in:
David Bezuidenhout 2019-06-04 13:32:38 +02:00
parent 9864036b07
commit fa71679619
3 changed files with 9 additions and 30 deletions

View File

@ -25,16 +25,9 @@ RUN \
sudo \
tcptraceroute \
ttf-dejavu && \
echo "**** give abc sudo access to traceroute & tcptraceroute & tcpping ****" && \
echo \
"abc ALL=(ALL) NOPASSWD: /usr/bin/traceroute" >> \
/etc/sudoers.d/traceroute && \
echo \
"abc ALL=(ALL) NOPASSWD: /usr/bin/tcptraceroute" >> \
/etc/sudoers.d/tcptraceroute && \
echo \
"abc ALL=(ALL) NOPASSWD: /usr/bin/tcpping" >> \
/etc/sudoers.d/tcpping && \
echo "**** give setuid access to traceroute & tcptraceroute ****" && \
chmod a+s /usr/bin/traceroute && \
chmod a+s /usr/bin/tcptraceroute && \
echo "**** fix path to cropper.js ****" && \
sed -i 's#src="/cropper/#/src="cropper/#' /etc/smokeping/basepage.html && \
echo "**** install tcping script ****" && \

View File

@ -25,16 +25,9 @@ RUN \
sudo \
tcptraceroute \
ttf-dejavu && \
echo "**** give abc sudo access to traceroute & tcptraceroute & tcpping ****" && \
echo \
"abc ALL=(ALL) NOPASSWD: /usr/bin/traceroute" >> \
/etc/sudoers.d/traceroute && \
echo \
"abc ALL=(ALL) NOPASSWD: /usr/bin/tcptraceroute" >> \
/etc/sudoers.d/tcptraceroute && \
echo \
"abc ALL=(ALL) NOPASSWD: /usr/bin/tcpping" >> \
/etc/sudoers.d/tcpping && \
echo "**** give setuid access to traceroute & tcptraceroute ****" && \
chmod a+s /usr/bin/traceroute && \
chmod a+s /usr/bin/tcptraceroute && \
echo "**** fix path to cropper.js ****" && \
sed -i 's#src="/cropper/#/src="cropper/#' /etc/smokeping/basepage.html && \
echo "**** install tcping script ****" && \

View File

@ -25,16 +25,9 @@ RUN \
sudo \
tcptraceroute \
ttf-dejavu && \
echo "**** give abc sudo access to traceroute & tcptraceroute & tcpping ****" && \
echo \
"abc ALL=(ALL) NOPASSWD: /usr/bin/traceroute" >> \
/etc/sudoers.d/traceroute && \
echo \
"abc ALL=(ALL) NOPASSWD: /usr/bin/tcptraceroute" >> \
/etc/sudoers.d/tcptraceroute && \
echo \
"abc ALL=(ALL) NOPASSWD: /usr/bin/tcpping" >> \
/etc/sudoers.d/tcpping && \
echo "**** give setuid access to traceroute & tcptraceroute ****" && \
chmod a+s /usr/bin/traceroute && \
chmod a+s /usr/bin/tcptraceroute && \
echo "**** fix path to cropper.js ****" && \
sed -i 's#src="/cropper/#/src="cropper/#' /etc/smokeping/basepage.html && \
echo "**** install tcping script ****" && \