Coder Social home page Coder Social logo

get_users() support? about napalm-opengear HOT 5 CLOSED

yeled avatar yeled commented on September 21, 2024
get_users() support?

from napalm-opengear.

Comments (5)

r0bertw avatar r0bertw commented on September 21, 2024 1

All passwords are MD5 hashed in /etc/shadow and not stored in config.xml, except for users that are in the PSTN dialin group (we recommend using a separate auxiliary account for dialin auth).

You can set the config.users.userX.password field to whatever you want writing directly to the shadow file's encrypted password field, or you can set config.users.userX.plaintext_password and the configurator will encrypt it for you. In both cases the passwords are removed from config.xml by the configurator as it runs.

The examples at the end of KB article might be useful: https://opengear.zendesk.com/hc/en-us/articles/216371303-Managing-local-users-from-the-command-line

If you remove and then re-add a user and then finally run the configurator, I would've thought the user's homedir would be untouched.

from napalm-opengear.

r0bertw avatar r0bertw commented on September 21, 2024 1

The API on our mainstream “OG” products (IM, ACM, CM) doesn’t have full parity with UI/CLI, so I’d probably continue via CLI.

from napalm-opengear.

yeled avatar yeled commented on September 21, 2024

you can set config.users.userX.plaintext_password and the configurator will encrypt it for you. In both cases the passwords are removed from config.xml by the configurator as it runs

Wow really! I had to strip plaintext_password from the XML for our own security reasons. Let me experiment with that.

It sounds delightful being able to run config -s config.users.${foo}.password=${bar} with the same MD5 hash that's in /etc/shadow! This would be Junos and EOS parity.

from napalm-opengear.

yeled avatar yeled commented on September 21, 2024

Just had a call with OpenGear. Perhaps we should limit opengear support to >4.6.0 and use the API instead?

from napalm-opengear.

yeled avatar yeled commented on September 21, 2024

and use the API instead?

oh, https://ftp.opengear.com/download/api/cs/og-cs-rest-api-specification-v1.4.html#users_get doesn't fetch the password.

We'll need to scrape /etc/shadow if we wanted parity with say, junos.

Or we just never report the password? might be much easier and on message with the OpenGear way.

from napalm-opengear.

Related Issues (2)

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.