Giter Club home page Giter Club logo

Comments (7)

MarcJHuber avatar MarcJHuber commented on July 17, 2024

Hi,

sure, you can limit commands in a profile:

profile roAccess {
    script {
        if (service == shell) {
            # message = "commandline=${cmd]" # uncomment that to see the command line
            if (cmd == "") { set priv-lvl = 15 pemit } # permit exec
            if (cmd =~ /^ping /) permit
            if (cmd = /^show run/ permit
            deny
        }
    }
}

Cheers,

Marc

from event-driven-servers.

vbddas123e12r avatar vbddas123e12r commented on July 17, 2024

Great! And how do I fix this? I came across it before when I was editing the config, but I couldn't figure it out

                                if (cmd =~ /
tac_plus-ng.cfg:40: You're using PCRE syntax, but this binary wasn't compiled with PCRE support.
10893: tac_plus-ng.cfg:40: You're using PCRE syntax, but this binary wasn't compiled with PCRE support.
10893: Detected fatal configuration error. Exiting.

from event-driven-servers.

vbddas123e12r avatar vbddas123e12r commented on July 17, 2024

It seems like I fixed an error related to PCRE. Installed additional packages and executed ./configure --with-pcre.
But the way you proposed to limit commands did not work, any commands are executed

from event-driven-servers.

MarcJHuber avatar MarcJHuber commented on July 17, 2024

Hi,

if PCRE (v2 will be mandatory soon) support is available (and "tac_plus-ng -v" confirms that) it's likely that your router/switch/whatever configuration lacks authorization directives. You're using the appropriate "aaa authorization command" statements (assuming that this is a Cisco device)?

Cheers,

Marc

from event-driven-servers.

vbddas123e12r avatar vbddas123e12r commented on July 17, 2024

I use the following Cisco settings (maybe I missed something):

!
tacacs server tpng
 address ipv4 x.x.x.x
 key secret
!
aaa group server tacacs+ tpnggp
 server name tpng
!
aaa authentication login default group tpnggp local
aaa authorization exec default group tpnggp local
!

from event-driven-servers.

MarcJHuber avatar MarcJHuber commented on July 17, 2024

Hi,

I'd try

aaa authorization commands 15 default group tpnggp if-authenticated

and, eventually,

aaa authorization config-commands

Cheers,

Marc

from event-driven-servers.

vbddas123e12r avatar vbddas123e12r commented on July 17, 2024

It looks like it's working!
I'll figure it out a little better tomorrow.
Thank you very much Mark, you helped me a lot!

from event-driven-servers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.