Coder Social home page Coder Social logo

What does priority mean? about puppet-sudo HOT 5 CLOSED

saz avatar saz commented on July 21, 2024 1
What does priority mean?

from puppet-sudo.

Comments (5)

anl avatar anl commented on July 21, 2024

Take a look at the end of conf.pp; it's used to order filenames in $sudo_config_dir:

file { "${priority}_${name}":
  ensure  => $ensure,
  path    => "${sudo_config_dir}${priority}_${name}",
  owner   => 'root',
  group   => $sudo::params::config_file_group,
  mode    => '0440',
  source  => $source,
  content => $content_real,

from puppet-sudo.

kithokit avatar kithokit commented on July 21, 2024

Would the order of the file names influences the configuration of sudoers file? That's what I wanna ask. Thanks

from puppet-sudo.

anl avatar anl commented on July 21, 2024

Yes - trying not to go too far afield from the scope of this module, from sudoers(5):

  When multiple entries match for a user, they are applied in order.
  Where there are multiple matches, the last match is used (which is not
  necessarily the most specific match).

and

  sudo will read each file in /etc/sudoers.d, skipping file names that
  end in ~ or contain a . character to avoid causing problems with
  package manager or editor temporary/backup files.  Files are parsed in
  sorted lexical order.

from puppet-sudo.

kithokit avatar kithokit commented on July 21, 2024

It is useful. Thanks

from puppet-sudo.

ITBlogger avatar ITBlogger commented on July 21, 2024

Yes, so higher priority (larger number) wins when there's a match.

Similar to adding zz to the front of a sudoers.d/ filename so that it is sorted to the bottom and thus "wins" if there's a match

from puppet-sudo.

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.