<div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace">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.</div>
<div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">The only problem with that is that they tend to run it as "root" rather than the rancid user.</div>
<div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">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).</div>
<div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Simple code sample:</div><div class="gmail_default" style="font-family:'courier new',monospace">
<br></div><div class="gmail_default" style="font-family:'courier new',monospace">if [[ $EUID -eq 0 && $force -ne 1 ]]</div><div class="gmail_default" style="font-family:'courier new',monospace">then</div>
<div class="gmail_default" style="font-family:'courier new',monospace"> echo "Run this as the RANCID user!"</div><div class="gmail_default" style="font-family:'courier new',monospace"> exit 1</div>
<div class="gmail_default" style="font-family:'courier new',monospace">fi</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">
There's a "force" option there, just in case you really did run it as root, which seems like bad practice to me...</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div>
<div class="gmail_default" style="font-family:'courier new',monospace">Just a thought!</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">
Matthew Walster</div></div>