Welcome, Guest. Please login or register.

Author Topic: Config backup: how to force enable without password before backup command  (Read 3817 times)

fvecchiatti

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hello,
I'm adding some DellEMC N1148 switch to our Nedi install (we manage Huawei, Cisco, Procurve, etc).
Dell switch support the "show configuration" only after entering the "enable" command (with or without an enable password).
Since we use a standard user/pass, the backup command fail with Dell because it execute the "page" and "conf" command while not in enable context.
If I add the "enablepass" the backup works for Dell but stop working for other devices.

Can I tell Nedi to enter the "enable" command before running the backup command only for Dell switch ?
I can use a different user/pass/enablepass but would be nice to keep the standard config ...

Here is the error message:
SSH :admin@172.Y.X.54:22 Tout:2s OS:DPCN EN:[\w+().-]+#\s?$
PTY :Forking ssh -o 'StrictHostKeyChecking no' -l admin 172.Y.X.54
CLI2:Matched 'password: ' sending password
CLI3:Password sent
CLI4:Matched SWI-6123-R01-1> (without enpass)
EVNT:MOD=C/1 L=150 CL=nede TGT=SWI-6123-R01-1 MSG=Command "terminal length 0" returned % Invalid input detected at '^' marker.
EVNT:MOD=C/1 L=150 CL=nede TGT=SWI-6123-R01-1 MSG=Command "show run" returned Unknown paging status without 'more' prompt defined
WAIT:Unknown paging status without 'more' prompt defined
ERR :No config ()


Many thanks.

Federico Vecchiatti

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2903
    • View Profile
    • NeDi
Hi, you can create a new user like admin;1 with an enable password. The retry backup with that user. If you don't need a specific enable password you could literaly put "dummy" as it only sends the password if prompted for it. However setting it, will have nedi.pl send the "enable" command...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

fvecchiatti

  • Newbie
  • *
  • Posts: 2
    • View Profile
Many thanks for reply.
If I add a dummy enablepass to the admin user, with Huawey backup config stop at CLI8.
 
Config (CLI)   ----------------------------------------------------------------
SSH :admin;1@10.10.10.247:22 Tout:2s OS:HuaweiVRP EN:\n[<\[].*?[>\]] ?$
PTY :Forking ssh -o 'StrictHostKeyChecking no' -l admin 10.10.10.247
CLI2:Matched 'password: ' sending password
CLI3:Password sent
CLI4:Matched
<SWI-6436-R01-1> (or gen. prompt with enpass & system-view cmd), enabling
CLI7:Enabling, no match PRE:system-view
Enter system view, return user view with Ctrl+Z.
CLI8:Matched enable prompt, OK
DBG :                ^
DBG :Error: Unrecognized command found at '^' position.
CMDR:screen-length 0 temporary result is OK



If there isn't a simple solution, I can proceed with different credential for different switch brand/type.

Thanks.
Federico

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2903
    • View Profile
    • NeDi
You can add another user like admin;2 to make sure the Dell-admin doesn't affect the Huawei admin...

Watch the CLI tutorial on youtube for more information on debugging CLI issues.
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo