Re: OSX 10.8 - Puppet 3.0.1 fails to start as root

126 views
Skip to first unread message

Ellison Marks

unread,
Nov 16, 2012, 12:18:03 PM11/16/12
to puppet...@googlegroups.com
Isn't the root account disabled by default on OSX? If you haven't explicitly enabled it, that might be the problem...

On Friday, November 16, 2012 7:51:38 AM UTC-8, Trey Ormsbee wrote:
Im new to puppet on mac,  so i might be doing something wrong...  However,  I cannot get puppet to run as the root user.  I get messages regarding not being able to create the required directories.  Here is the debug/trace outbput that I am getting:

Debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not exist
Debug: Puppet::Type::User::ProviderUseradd: file userdel does not exist
Debug: Puppet::Type::User::ProviderPw: file pw does not exist
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
Debug: Executing '/usr/bin/dscl -plist . -list /Users'
Debug: Executing '/usr/bin/dscl -plist . -read /Users/puppet'
Debug: Executing '/usr/bin/plutil -convert xml1 -o /dev/stdout /var/db/dslocal/nodes/Default/users/puppet.plist'
Debug: Converting binary plist to XML
Debug: Executing: 'plutil -convert xml1 -o - -'
Debug: Converting XML values to a hash.
Error: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: undefined method `string' for nil:NilClass
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in `get_password'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in `generate_attribute_hash'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in `single_report'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in `getinfo'
/Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?'
/Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?'
/Library/Ruby/Site/1.8/puppet/settings.rb:715:in `service_user_available?'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in `use_service_user?'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in `to_resource'
/Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog'
/Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each'
/Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog'
/Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use'
/Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/application.rb:438:in `plugin_hook'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/util.rb:500:in `exit_on_fail'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/util/command_line.rb:87:in `execute'
/usr/bin/puppet:4
Error: Could not prepare for execution: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: undefined method `string' for nil:NilClass
undefined method `string' for nil:NilClass
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in `get_password'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in `generate_attribute_hash'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in `single_report'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in `getinfo'
/Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?'
/Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?'
/Library/Ruby/Site/1.8/puppet/settings.rb:715:in `service_user_available?'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in `use_service_user?'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in `to_resource'
/Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog'
/Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each'
/Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog'
/Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use'
/Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/application.rb:438:in `plugin_hook'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/util.rb:500:in `exit_on_fail'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/util/command_line.rb:87:in `execute'
/usr/bin/puppet:4


Note that running as a regular user works fine... just not as root.  Maybe root is not required to run the puppet agent on mac??  I do not know.  I also see there are some bugs on the issue tracker with similar errors,  but the posters of those bugs dont seem to have the problem of not being able to start puppet as root.

Any idea what am missing?


Josh Cooper

unread,
Nov 16, 2012, 2:29:17 PM11/16/12
to puppet...@googlegroups.com
Hi Trey,
These exceptions are due to
https://projects.puppetlabs.com/issues/12833. OSX 10.8 changed how
password hashes are generated. We've fixed this in 3.0.x, it would be
great if you could give that a try in preparation for 3.0.2.

>
> Note that running as a regular user works fine... just not as root. Maybe
> root is not required to run the puppet agent on mac?? I do not know. I
> also see there are some bugs on the issue tracker with similar errors, but
> the posters of those bugs dont seem to have the problem of not being able to
> start puppet as root.
>
> Any idea what am missing?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/tSedzDKtbV4J.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.



--
Josh Cooper
Developer, Puppet Labs

Trey Ormsbee

unread,
Nov 16, 2012, 11:15:45 PM11/16/12
to puppet...@googlegroups.com
Hmm...   it's enabled on mine,  this is an upgrade from 10.7 if that matters.

Trey Ormsbee

unread,
Nov 16, 2012, 11:16:13 PM11/16/12
to puppet...@googlegroups.com
Sounds good,  I will give that a go sometime this weekend and let you know.

Thanks,
Trey

Trey Ormsbee

unread,
Nov 16, 2012, 11:35:02 PM11/16/12
to puppet...@googlegroups.com
Looks like that worked,  I pulled down the commit listed in the bug report installed it an all is good.  I'll keep an eye for the official release of 3.0.2  Thank you!
Reply all
Reply to author
Forward
0 new messages