[rancid] user wich is running rancid-run [suggestion]

Diego Ercolani diego.ercolani at ssis.sm
Tue Sep 22 10:29:02 UTC 2009

I would like to suggest developer to make a little check in script invoking 
rancid tools that are going to modify filesystem: rancid-run, rancid-cvs 

The issue:
In my installation as (i think) the others, rancid is the user which normally 
invoke these tools.
For an error I invoked rancid-run as root and what I obtained was that the 
repository was modified in such a manner that:
1. all the router configuration has been deleted  as svn didn't find directory 
under the root homepage
2. I had to change the owner of every file back to rancid, re-invoke rancid-
run as user and then all have been reinitialized.

The Solution:
Can be only a little prehamble in rancid-run and rancid-cvs scripts that 
verify the user which is running scripts:
if [ "$USER" != "$CORRECT_USER" ]; then
  echo "User $USER is not allowed to run $0!" >&2
  echo "Please invoke $0 as user $CORRECT_USER" >&2

this could be a little modification that should save some headache...
Thank you

More information about the Rancid-discuss mailing list