[chef] Re: Question about Chef running as root


Chronological Thread 
  • From: Michael Della Bitta < >
  • To:
  • Subject: [chef] Re: Question about Chef running as root
  • Date: Wed, 8 May 2013 10:39:57 -0400

Hi, Ahmed, 

When you bootstrap the node, if you pass in the --sudo flag, it will log in as the specified user and escalate privileges after that. When knife runs on the host later, it needs to be run with sudo. 

That's pretty much it!

Michael Della Bitta

------------------------------------------------
Appinions
18 East 41st Street, 2nd Floor
New York, NY 10017-6271

www.appinions.com

Where Influence Isn’t a Game


On Wed, May 8, 2013 at 9:40 AM, Ahmed H. < " target="_blank"> > wrote:
Hello all,

I'm fairly new to Chef. I stepped through some parts of the documentation to understand what Chef is all about, and I have a rough idea.

So I am working on a project now that already uses Chef to deploy to servers. I kind of jumped into the middle of it (it was al written by someone else). The way it currently works from what I can see, is the when the scripts are run, it logs into the server as root, and then does what it needs to do based on json files. This has worked well so far, but now I am facing an issue with deploying to Amazon EC2 instances.

With Amazon EC2, we can't log in as root by default, only whatever user that is assigned (i.e. "ubuntu for Ubuntu instances, "ec2-user" for RHEL etc.). I cannot change that at the moment, so I have to find another way to do it.

My question is: does Chef always run as root? Is there a way to bypass the root user altogether, and use another user with all the privileges? How would you recommend that I tackle this?

As I said, I'm very new to this so kindly bear with me.

Thank you!







Archive powered by MHonArc 2.6.16.

§