[rancid] Checking for root
matthew at walster.org
Thu Jun 6 14:45:09 UTC 2013
More often than not, people are coming to me with RANCID issues that have
arisen because someone has been impatient and decided to run rancid-run
manually rather than letting the next run initiate manually.
The only problem with that is that they tend to run it as "root" rather
than the rancid user.
Would it be worth putting a check in so that rancid-run script won't run
unless it's as a non-privileged user (or even better, build it into the
automake run to discover the intended final user).
Simple code sample:
if [[ $EUID -eq 0 && $force -ne 1 ]]
echo "Run this as the RANCID user!"
There's a "force" option there, just in case you really did run it as root,
which seems like bad practice to me...
Just a thought!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rancid-discuss