Code Monkey home page Code Monkey logo

Comments (3)

kungfujoe avatar kungfujoe commented on May 28, 2024

Pretty sure you did it wrong. Note that I'm not involved in this project, I just happened to stumble in, and I know how to do this. I had to add two LWRPs to make this work. I wanted to make user 'foo' a sudoer that requires a password for all commands except chef-client. This is how I did it:

sudo 'foo-as-sudoer' do
  user 'foo'
  nopasswd false
end

sudo 'foo-run-chef-client-nopasswd' do
  user 'foo'
  commands ['/usr/bin/chef-client']
  runas 'root'
  nopasswd true
end

I've verified this code on a fresh machine within the last half hour, so I hope this works out for you!

from sudo.

efalkner avatar efalkner commented on May 28, 2024

Thank you! I've since gotten the cookbooks to work, but not for a template.
I'll have to give that a try. Cheers!

On Tue, Mar 10, 2015 at 2:01 PM, kungfujoe [email protected] wrote:

Pretty sure you did it wrong. Note that I'm not involved in this project,
I just happened to stumble in, and I know how to do this. I had to add two
LWRPs to make this work. I wanted to make user 'foo' a sudoer that requires
a password for all commands except chef-client. This is how I did it:

sudo 'foo-as-sudoer' do
user 'foo'
nopasswd false
end

sudo 'foo-run-chef-client-nopasswd' do
user 'foo'
commands ['/usr/bin/chef-client']
runas 'root'
nopasswd true
end

I've verified this code on a fresh machine within the last half hour, so I
hope this works out for you!


Reply to this email directly or view it on GitHub
#60 (comment)
.

from sudo.

tas50 avatar tas50 commented on May 28, 2024

Looks like this is solved in the response

from 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.