<div dir="ltr">Hello,<br><br>I am trying to make rancid pull the configs from a pair of Palo Alto Panorama devices.<div>I've installed it on an Alma Linux 9 box with the default package from epel (rancid.x86_64 3.13-7.el9).<br>I have in router.db a list of Palo Alto firewalls and a pair of Panorama devices. Login to all devices works.</div><div>If I login with the rancid user and run rancid-run from the shell ([rancid@rancidbox ~]$ /usr/libexec/rancid/rancid-run) it gets the config for all devices.<br>If I login as root and run rancid run as the rancid user ("[rancid@rancidbox ~]# sudo -u rancid /usr/libexec/rancid/rancid-run") it also works for all devices.</div><div>But if I try to run it from cron as the user rancid, it works for the firewalls but not for panorama.</div><div><br>The cron entry looks like this:<br><br><i>SHELL=/bin/bash<br>PATH=/sbin:/bin:/usr/sbin:/usr/bin<br>MAILTO=root<br>HOME=/var/rancid<br><br>0 */8 * * * rancid /usr/libexec/rancid/rancid-run</i><br><br></div><div>In the rancid logs I see:<br><i>missed cmd(s): all commands<br>End of run not found<br>panlogin error: Error: TIMEOUT reached</i><br><br>I've managed to capture the .raw and .new files for a panorama device when rancid-run was executed from cron and looks like it connects to the device but it gets stuck:</div><div><br><i>[rancid@rancidbox ~]$ cat network-devices/configs/panorama_hostname.internal.domain.raw<br>panorama_hostname.internal.domain<br>spawn ssh -x -l rancid_login_user panorama_hostname.internal.domain<br>*************************************************************************<br> *                                                                       *<br> *              WARNING! Access to this device is restricted             *<br> *                   to those individuals with specific                  *<br> *             permissions. If you are not an authorized user            *<br> *                             disconnect now.                           *<br> *                                                                       *<br> *                 Any attempts to gain unauthorized access              *<br> *                     will be prosecuted to the fullest                 *<br> *                             extent of the law.                        *<br> *                                                                       *<br> *************************************************************************<br>(rancid_login_user@panorama_hostname.internal.domain) Password: <br>Last login: Wed Jul 26 11:51:59 2023 from IP.XXX.YYY.ZZZ<br>No entry for terminal type "network";<br>using dumb terminal settings.<br><br><br><br>Number of failed attempts since last successful login: 0<br><br><br><br>rancid_login_user@panorama_hostname.internal.domain(primary-active)> <br>rancid_login_user@panorama_hostname.internal.domain(primary-active)> set <br>rancid_login_user@panorama_hostname.internal.domain(primary-active)> set cli <br>rancid_login_user@panorama_hostname.internal.domain(primary-active)> set cli scripting<br>-mode <br>rancid_login_user@panorama_hostname.internal.domain(primary-active)> set cli scripting<br>-mode on<br>rancid_login_user@panorama_hostname.internal.domain(primary-active)> [rancid@rancidbox ~]$ <br><br><br><br><br>[rancid@rancidbox ~]$ cat network-devices/configs/panorama_hostname.internal.domain.new<br>#RANCID-CONTENT-TYPE: paloalto<br>#</i><br><br></div><div><br></div><div>If I try to run run rancid instead of rancid-run from cron for panorama it works (needs a PATH added to be able to find the panlogin script but other than that it succeeds)<br><br><i>PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/libexec/rancid/:/usr/share/perl5/vendor_perl/rancid</i></div><div><i>08 10 * * * rancid /usr/libexec/rancid/rancid -t paloalto -d panorama_hostname.internal.domain</i><br></div><div><br></div><div>I've also got a dump of all environment variables for the rancid user and put it in cron but same as before: rancid-run always fails for panorama but works for the firewalls. (it has the same content in the .raw file every time)<br><br>I was thinking that since invoking rancid from cron works but rancid-run fails, it might have something to do with how control_rancid or rancid-fe invokes rancid but couldn't see anything obvious in those scripts that might cause this behaviour.<br><br>I am not sure what exactly fails. I appreciate any pointers you might have.<br><br>Thanks,<br>Lucian Lepadatu<br><br><br></div></div>