Giter Site home page Giter Site logo

Comments (4)

logicminds avatar logicminds commented on July 18, 2024

I thought the privilege (operator, administrator) was assigned to the user at user creation time? It seems weird that the CLI/Rubyipmi would be able to override the role that is assigned to the user.

To answer your question about extending support. Yes it would be really simple to add the priv option to the connection object. Basically would need to do the following in the initialize method of the connection object.

If you want to code this yourself and issue a pull request it should be fairly simple to do. Otherwise I can probably take care of this next week.

class Connection
def initialize
...
@options['L'] = opts[:priv] if opts.keys?(:priv)
# should probably check to make sure the priv type matches one of these
#-L <privlvl>
#              Force session privilege level.  Can be CALLBACK, USER, OPERATOR, ADMINISTRATOR. #Default is ADMINISTRATOR.
end

then call

conn = Rubyipmi.connect("username", "password", "hostname", {:priv => 'OPERATOR'})

from rubyipmi.

logicminds avatar logicminds commented on July 18, 2024

@mrichar1 just pushed branch 0.8.0 with this support. https://github.com/logicminds/rubyipmi/tree/0.8.0

I haven't merged to master yet until I can get my integration tests to pass. Feel free to test using this branch.

The privilege is optional as I am seeing weird issues sometimes when using it. Just provide this option to test out.

conn = Rubyipmi.connect("username", "password", "hostname", 'any', {:privilege => 'OPERATOR'})
# PRIV_TYPES = ['CALLBACK', 'USER', 'OPERATOR', 'ADMINISTRATOR']

from rubyipmi.

mrichar1 avatar mrichar1 commented on July 18, 2024

Hi,

I've done some testing and it seems to work as expected, both with ipmitool and freeipmi.

Many thanks!

from rubyipmi.

logicminds avatar logicminds commented on July 18, 2024

this has now been merge to master. Will release to ruby gems shortly.

from rubyipmi.

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.