Closed ausfestivus closed 5 years ago
Indeed.
I could add a -s option which launched traceroute with sudo.
You can then add bob ALL=(ALL) NOPASSWD: /usr/bin/traceroute
to your sudoers file in order to allow the command to be used without needing a password when sudoing.
Good for you ?
At the very least, perform a check that will show an error message if permissions disallow the runtime to work. For instance, I just had this happen to me and I had to run some debugging to see why iwas getting blank, but obvious output:
~/projects/src/tcpping$ tcpping 8.8.8.8 53
^C
~/projects/src/tcpping$
Just submitted a PR to error if sudo
us required.
Issue resolved by @notjames
Morning,
Attempted to use this new script on an Ubuntu 16.04.5 LTS VM and it was producing zero output for smokeping. Debugged it down to the use of the
-T
switch withtraceroute
and the fact that the usersmokeping
runs as is just a normal user. Usersmokeping
cantsudo
andtraceroute
isnt setuid root by default.Some more detailed notes:
running as normal user
running with sudo