[chef] Re: RE: Re: RE: Help..(NOT Fixed!) ohai doesn't reflect ldap users after ldap config in first chef run


Chronological Thread 
  • From: Yvonne Lam < >
  • To:
  • Subject: [chef] Re: RE: Re: RE: Help..(NOT Fixed!) ohai doesn't reflect ldap users after ldap config in first chef run
  • Date: Fri, 23 Mar 2012 08:45:22 -0700

I worked around this by calling `getent passwd` for specific users in a ruby block or some such.  It's hacky, but it worked for my particular scenario.

Yvonne

On Thu, Mar 22, 2012 at 9:08 AM, Van Fossan,Randy < "> > wrote:
I think...  The Etc.endgrent and Etc.pwent deal with the /etc/passwd and
/etc/group and does not affect LDAP.  So calling the ruby block to
"reset the group list" isn't helping where the ldap accounts are
concerned.

Anyone have any ideas?
 Randy

-----Original Message-----
From: Van Fossan,Randy
Sent: Thursday, March 22, 2012 9:50 AM
To: ">
Subject: RE: [chef] Re: RE: Help..(NOT Fixed!) ohai doesn't reflect ldap
users after ldap config in first chef run

I tried the solutions referred to in the ticket and it still did not
help.   I will keep searching..

I added this to my ldap cookbook
ohai "reload_passwd" do
 action :nothing
#  plugin "passwd"
end

# fixes CHEF-1699
ruby_block "reset group list" do
 block do
   Etc.endgrent
   Etc.endpwent
 end
 action :nothing
end
....
# Install the template
template "/etc/ldap.conf" do
 source "ldap.conf.erb"
 owner "root"
 group "root"
 mode 0644
 notifies :create, "ruby_block[reset group list]", :immediately
 notifies :reload, resources(:ohai => "reload_passwd"), :immediately
end

In Nagios cookbook...  (Still fails on the nagacct) remote_directory
node['nagios']['plugin_dir'] do
 source "plugins"
 owner "nagacct"
 group "nagacct"
 mode 0755
 files_mode 0755
 purge true
 notifies :restart, "service[xinetd]", :delayed end


-----Original Message-----
From: Joshua Miller [mailto: "> ]
Sent: Thursday, March 22, 2012 12:33 AM
To: ">
Cc: < "> >
Subject: [chef] Re: RE: Help..(NOT Fixed!) ohai doesn't reflect ldap
users after ldap config in first chef run

Not sure if this helps as your OS is not listed but might want to have a
look.

http://tickets.opscode.com/browse/CHEF-1699?page=com.atlassian.jira.plug
in.system.issuetabpanels:comment-tabpanel&focusedCommentId=16783#comment
-16783


On Mar 21, 2012, at 8:35 PM, "Van Fossan,Randy" < "> >
wrote:

> can't find user for nagacct






Archive powered by MHonArc 2.6.16.

§