Description:
Used variables:
With the following Addin script you can configure TACACS+ on LANCOM Switches of the GS-2xxx series:
exports.main = function (config, context) {
var addTACACSsrv = function (ServerNumber, OnOff, IPorHost, Port, Secret) {
var Table_TACACS_Server = config.getTableByOid("1.3.10.5");
var Table_TACACS_Server_row = Table_TACACS_Server.createNewRow();
Table_TACACS_Server_row.setByOid("1", ServerNumber);
Table_TACACS_Server_row.setByOid("2", OnOff);
Table_TACACS_Server_row.setByOid("3", IPorHost);
Table_TACACS_Server_row.setByOid("4", Port);
Table_TACACS_Server_row.setByOid("5", Secret);
Table_TACACS_Server.addOrMerge(Table_TACACS_Server_row);
};
var authMethod = function (AuthMethod, AuthFallback) {
config.setScalarByOid(AuthMethod, "3");
config.setScalarByOid(AuthFallback, "1");
};
config.setScalarByOid("1.3.10.2.1", "1");
config.setScalarByOid("1.3.10.2.2", "1");
addTACACSsrv(ServerNumber, OnOff, IPorHost, Port, Secret);
var tftpAuth = "1.3.9.9"
var tftpFallback = "1.3.9.10"
var consoleAuth = "1.3.9.1"
var consoleFallback = "1.3.9.2"
var telnetAuth = "1.3.9.3"
var telnetFallback = "1.3.9.4"
var sshAuth = "1.3.9.5"
var sshFallback = "1.3.9.6"
authMethod(AuthMethod, AuthFallback);
};
|
---|