[chef] Re: Updating uid/gid of existing user


Chronological Thread 
  • From: Tiago Cruz < >
  • To: " " < >
  • Subject: [chef] Re: Updating uid/gid of existing user
  • Date: Wed, 17 Dec 2014 10:20:35 -0200

You can "force" in your recipe like this:

group "deployer" do
  gid "501"
end

user "deployer" do
  uid "501"
  group "deployer"
  comment "deployer"
end


On Wed, Dec 17, 2014 at 6:08 AM, Nils-Helge Garli Hegvik < " target="_blank"> > wrote:
Hi!

I need to take control over a user created by a package that is
installed in our syste, so it does not change between
uninstall/install. Therefore, I want to use the "user" resource to
define a uid and gid for this user, so it is already created/modified
before the package is installed. The problem is, the user already have
different uid/gid between different nodes, so I can't really just find
the current uid and then set it to that uid. For some nodes, this will
cause the uid of the user to change. So, the question is, how do I
handle ownership of existing files and directories where this will
cause the uid to change? For files in the home folder, this is handled
automatically by the 'usermod' command, but not so for files
elsewhere. I assume someone has come across this issue before, so how
did you handle it? Can the current "user" resource handle this, or
does a recipe exist that can handle this?

Regards,

Nils-Helge Garli Hegvik


--
-- Tiago Cruz




Archive powered by MHonArc 2.6.16.

§