Re: [rancid] Ubuntu with Rancid 3.7 - Comware (CMW)

2018-12-19 Thread Aaron Sutton
Hi,

More information,

I think the SH: 1: cmwlogin: not found error is due to not running this as the 
rancid user. I also get the same error with cisco devices which run completely 
run with rancid-run.

admin@rancidserver:/var/lib/rancid/bin$ sudo ./rancid -t cisco routername100
[sudo] password for admin:
sh: 1: clogin: not found
routername100: missed cmd(s): all commands
routername100: End of run not found

If i try and run under rancid account however, i'm getting permission errors.
rancid@rancidserver:~/bin$ ./rancid -t cisco routername100
Can't open rotuername100.new for writing: Permission denied

Kind Regards
Aaron


___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Ubuntu with Rancid 3.7 - Comware (CMW)

2018-12-19 Thread Aaron Sutton
Hi,

Thank you Haes, I found the path for PERL5LIB and copied cmw.pm into this 
folder.

I also had to modify cmwlogin SHEBANG line from
'#! /usr/local/bin/expect --' to '#! /usr/bin/expect --'

I can now successfully run ./cmwlogin -y aes128-cbc routername. This logs into 
the device

I can also successfuly run ./cmwlogin -y aes128-cbc -c 'display current-config' 
routername. This logs into the device, outputs running-config and then exits 
SSH session.

Hit my next problem now, i'm getting 'end of run not found' in my logs.

routername1: End of run not found
return
routername2: End of run not found
return
routername3: End of run not found
return

If i try the following command;

./rancid -d -t cmw routername1
loadtype: device type cmw
loadtype: found device type cmw in /etc/rancid/rancid.types.conf
executing cmwlogin -t 90 -c"display version;display boot-loader;display 
startup;dir /all;dir /all unit2>flash:/;dir /all slot2#flash:/;dir /all 
unit3>flash:/;dir /all slot3#flash:/;dir /all unit4>flash:/;dir /all 
slot4#flash:/;dir /all unit5>flash:/;dir /all slot5#flash:/;dir /all 
unit6>flash:/;dir /all slot6#flash:/;dir /all unit7>flash:/;dir /all 
slot7#flash:/;dir /all unit8>flash:/;dir /all slot8#flash:/;display 
device;display device manuinfo;display fan;display power;display poe 
powersupply;display poe temperature-protection;display transceiver 
interface;display cluster;display domain;display local-user;display 
password-control;display password-control super;display ssh server 
status;display irf;display xrn-fabric;display ftm topology-database;display 
fib;display ip routing-table;display ospf;display ospf brief;display vlan 
all;display lacp sys;display link-aggregation summary;display link-aggregation 
verbose;display loopback-detection;display mirror all;display ntp-service 
status;display stp root;display current-configuration" routername1
sh: 1: cmwlogin: not found
aubneleaf3a0511: missed cmd(s): all commands
aubneleaf3a0511: End of run not found
aubneleaf3a0511: clean_run is false
aubneleaf3a0511: found_end is false

Now, SH: 1: cmwlogin: not found error was why i updated the SHEBANG originally, 
 but for some reason i'm not hitting this on ./rancid. If i run rancid-run 
however, this issue isn't present in the logs.

I feel very close to getting this working now...

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


[rancid] aerohive/hiveos support

2018-12-19 Thread Nick Nauwelaerts
(also included: removal of fortinet/fnrancid references since it's now a module 
& a few minor nitpicks)

support for aerohive/hiveos access points:

login script ahlogin:
* originally by erik muller: https://github.com/ermuller/rancid-stuff.
 * should be up to date with the latest changes of svn 3937.
 * saving on changed config works, -x & -c have also been tested.
* .cvsignore entry added

module hiveos.pm:
* respects nocommstr; filter_pwds & filter_osc
* tested against multiple hardware options & operating system versions
* does not sort acls/snmp yet
* does not yet handle all passwords/secrets - it does filter the items we use 
with respect to filter_* settings
* also fetches additional info depending on filter_* settings
* no clear end of run marker
* rancid.types.base entries

other:
* docs, makefiles & config scripts have been updated completely i hope.
* hiveos.pm.in has a lot of comments, they can be deleted if they add little/no 
value.

has been in use for almost 6 months. perhaps naming the login script ahlogin 
(aerohive login) and the module hiveos.pm seems strange, just rename if you 
don't like it.



git code here but git & me just dont get along:
https://github.com/inphobia/rancid-aerohive-support

// nick



Volg Aquafin op Facebook | 
Twitter | 
YouTube | 
LinkedIN

In het kader van de uitoefening van onze taken verzamelen we bij Aquafin 
persoonsgegevens. Hoe we omgaan met deze gegevens en wat de rechten van de 
betrokkenen zijn, kan je nalezen in onze privacy 
policy.

  P Denk aan het milieu. Druk deze mail niet onnodig af.


ah.diff
Description: ah.diff
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Ubuntu with Rancid 3.7 - Comware (CMW)

2018-12-19 Thread heasley
Wed, Dec 19, 2018 at 06:12:56AM +, aaron.sut...@glencore.com.au:
> Hi All,
> 
> Seeking some assistance as I'm a RANCID noob. Have had no issues getting 
> Cisco devices to work, however no luck with HPE switches.
> 
> I have a large environment of HPE switches which run COMEWARE v7. I found the 
> following device scripts by JRBINKS at the following link: 
> https://sites.google.com/site/jrbinks/code/rancid/cmwrancid
> 
> When I attempt to run a test against my device, I get the following error:
> 
> rancid@testrancidserver:~/bin$ ./rancid -d -t cmw aubneleaf3a0508
> loadtype: device type cmw
> loadtype: found device type cmw in /etc/rancid/rancid.types.conf
> loadtype: loading cmw failed: Can't locate cmw.pm in @INC (you may need to 
> install the cmw module) (@INC contains: /etc/perl 
> /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 
> /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 
> /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 
> /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base 
> /usr/share/perl5/rancid) at /usr/share/perl5/rancid/rancid.pm line 257.

cmw.pm must be found in the path of rancid.conf:PERL5LIB

> Couldn't load device type spec for cmw
> 
> Server: Ubuntu x64 18.04
> Rancid version 3.7
> 
> >From /etc/rancid/rancid.conf
> BASEDIR=/var/lib/rancid; export BASEDIR
> PATH=/usr/lib/rancid/bin:/usr/bin:/usr/sbin:/bin:/usr/local/bin; export PATH
> 
> I've copied cmwlogin to /var/lib/rancid/bin
> I've copied cmw.pm to /var/lib
> 
> rancid@aubnesrv7rancid1:~/bin$ pwd
> /var/lib/rancid/bin
> rancid@aubnesrv7rancid1:~/bin$ ls cmwlogin -l
> -rwxr-xr-x 1 root root 30304 Dec 19 15:18 cmwlogin
> 
> rancid@aubnesrv7rancid1:~$ pwd
> /var/lib/rancid
> rancid@aubnesrv7rancid1:~$ ls cmw.pm -l
> -rwxr-xr-x 1 rancid rancid 16533 Dec 19 15:21 cmw.pm
> 
> rancid@testrancidserver:~/bin$ export
> declare -x HOME="/var/lib/rancid"
> declare -x LANG="en_US.UTF-8"
> declare -x LOGNAME="rancid"
> declare -x MAIL="/var/mail/rancid"
> declare -x OLDPWD="/var/lib/rancid"
> declare -x 
> PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin"
> declare -x PWD="/var/lib/rancid/bin"
> declare -x SHELL="/bin/bash"
> declare -x SHLVL="1"
> declare -x TERM="xterm"
> declare -x USER="rancid"
> declare -x XDG_DATA_DIRS="/usr/local/share:/usr/share:/var/lib/snapd/desktop"
> 
> Anyone able to assist?
> 
> Kind Regards
> Aaron
> 
> 
> *
> 
> LEGAL DISCLAIMER. The contents of this electronic communication and any 
> attached documents are strictly confidential and they may not be used or 
> disclosed by someone who is not a named recipient.
> 
> If you have received this electronic communication in error please notify the 
> sender by replying to this electronic communication inserting the word 
> "misdirected" as the subject and delete this communication from your system.
> 
> *

> ___
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss