From 07abb1fecc72512ace5c2c0f2009caebf415e543 Mon Sep 17 00:00:00 2001 From: Ask Selmer Date: Wed, 15 May 2024 10:03:33 +0200 Subject: [PATCH 1/2] Add post-login command to enable admin if vars(:enable) is true in Dlink model --- lib/oxidized/model/dlink.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/oxidized/model/dlink.rb b/lib/oxidized/model/dlink.rb index da3f60970..01319bdb1 100644 --- a/lib/oxidized/model/dlink.rb +++ b/lib/oxidized/model/dlink.rb @@ -37,6 +37,7 @@ class Dlink < Oxidized::Model cfg :telnet, :ssh do post_login 'disable clipaging' + post_login 'enable admin' if vars(:enable) == true pre_logout 'logout' end end From 35aebec79ed4cab2052e53e01fbcb102ffb31531 Mon Sep 17 00:00:00 2001 From: Ask Selmer Date: Wed, 15 May 2024 10:08:39 +0200 Subject: [PATCH 2/2] Add support for 'enable admin' in Dlink model --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 709b8752b..470aa9609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - eos: Hide radius and snmp secrets for Arista EOS (@iriseden) - docker/podman: baseimage updated to phusion/baseimage:jammy-1.0.4 - fortios: Hide date in acme certifcate comments (@systeembeheerder) +- dlink: added support for 'enable admin' before getting configuration, if enable=true (@as8net) ### Fixed - fixed prompt for vyos/vyatta to allow logins with non-priviliged accounts. Fixes #3111 (@h-lopez)