Issue #9586 has been updated by Nigel Kersten. Assignee changed from Nigel Kersten to Nick Suckling
Nick and I have been chatting off-list, and he's much more qualified to help sort this out than I am at the moment. Nick, give us a shout out if you need a hand with tests or anything else in the dev process, and thanks for helping out! ---------------------------------------- Bug #9586: "Could not find a default provider for user" breaks puppetmasterd on OpenBSD https://projects.puppetlabs.com/issues/9586 Author: Darren Spruell Status: Accepted Priority: High Assignee: Nick Suckling Category: provider Target version: Affected Puppet version: 2.7.3 Keywords: OpenBSD useradd ProviderUseradd Branch: Trying to start 'puppet master' on new install of Puppet 2.7.3 w/ Facter 1.6.0 fails on OpenBSD 4.8 i386. ruby 1.8.6 (2009-06-08 patchlevel 369) [i386-openbsd4.8] Receiving error: *Could not create resources for managing Puppet's files and directories in sections [:main, :ssl]: Could not find a default provider for user* With trace: $ sudo puppet master --no-daemonize --verbose --debug --trace debug: Failed to load library 'shadow' for feature 'libshadow' debug: Puppet::Type::User::ProviderUseradd: file chage does not exist debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist debug: Puppet::Type::User::ProviderLdap: true value when expecting false debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/ dscl does not exist /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1402:in `defaultprovider' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1509:in `default' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:540:in `set_default' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1762:in `initialize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:457:in `new' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:457:in `service_user_available?' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 45:in `use_service_user?' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 40:in `owner' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 97:in `to_resource' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:564:in `to_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:562:in `each' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:562:in `to_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:621:in `use' /usr/local/lib/ruby/1.8/sync.rb:230:in `synchronize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:615:in `use' /usr/local/lib/ruby/site_ruby/1.8/puppet/application/master.rb:227:in `setup' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:411:in `hook' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:402:in `exit_on_fail' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute' /usr/local/bin/puppet:4 err: Could not create resources for managing Puppet's files and directories in sections [:main, :master, :ssl, :metr ics]: Could not find a default provider for user debug: Puppet::Type::User::ProviderUseradd: file chage does not exist debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist debug: Puppet::Type::User::ProviderLdap: true value when expecting false debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/ dscl does not exist /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1402:in `defaultprovider' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1509:in `default' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:540:in `set_default' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1762:in `initialize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:457:in `new' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:457:in `service_user_available?' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 45:in `use_service_user?' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 40:in `owner' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 97:in `to_resource' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:564:in `to_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:562:in `each' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:562:in `to_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:621:in `use' /usr/local/lib/ruby/1.8/sync.rb:230:in `synchronize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:615:in `use' /usr/local/lib/ruby/site_ruby/1.8/puppet/application/master.rb:235:in `setup' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:411:in `hook' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:402:in `exit_on_fail' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute' /usr/local/bin/puppet:4 err: Could not create resources for managing Puppet's files and directories in sections [:ca]: Could not find a defa ult provider for userESC[0m debug: Puppet::Type::User::ProviderUseradd: file chage does not exist debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist debug: Puppet::Type::User::ProviderLdap: true value when expecting false debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/ dscl does not exist /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1402:in `defaultprovider' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1509:in `default' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:540:in `set_default' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1762:in `initialize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:457:in `new' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:457:in `service_user_available?' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 45:in `use_service_user?' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 40:in `owner' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 97:in `to_resource' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:564:in `to_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:562:in `each' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:562:in `to_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:621:in `use' /usr/local/lib/ruby/1.8/sync.rb:230:in `synchronize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:615:in `use' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 140:in `initialize' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 31:in `new' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 31:in `init_singleton_instance' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:106:in `send' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:106:in `cached_value' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:98:in `cached_value' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:48:in `singleton_instance' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 45:in `instance' /usr/local/lib/ruby/site_ruby/1.8/puppet/application/master.rb:236:in `setup' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:411:in `hook' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:402:in `exit_on_fail' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute' /usr/local/bin/puppet:4 ESC[1;35merr: Could not create resources for managing Puppet's files and directories in sections [:main, :ssl, :ca]: Could not find a default provider for userESC[0m ESC[0;37mdebug: Puppet::Type::User::ProviderUseradd: file chage does not existESC[0m ESC[0;37mdebug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not existESC[0m ESC[0;37mdebug: Puppet::Type::User::ProviderLdap: true value when expecting falseESC[0m ESC[0;37mdebug: Puppet::Type::User::ProviderPw: file pw does not existESC[0m ESC[0;37mdebug: Puppet::Type::User::ProviderDirectoryservice: file / usr/bin/dscl does not existESC[0m /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1402:in `defaultprovider' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1509:in `default' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:540:in `set_default' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1762:in `initialize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:457:in `new' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:457:in `service_user_available?' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 45:in `use_service_user?' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 40:in `owner' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 97:in `to_resource' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:564:in `to_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:562:in `each' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:562:in `to_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:621:in `use' /usr/local/lib/ruby/1.8/sync.rb:230:in `synchronize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:615:in `use' /usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/ssl_file.rb:50:in `initialize' /usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb: 314:in `new' /usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb: 314:in `make_terminus' /usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb: 123:in `terminus' /usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb: 302:in `prepare' /usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb: 181:in `find' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/host.rb:138:in `key' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/host.rb:176:in `certificate' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 222:in `setup' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 146:in `initialize' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 31:in `new' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 31:in `init_singleton_instance' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:106:in `send' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:106:in `cached_value' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:98:in `cached_value' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:48:in `singleton_instance' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 45:in `instance' /usr/local/lib/ruby/site_ruby/1.8/puppet/application/master.rb:236:in `setup' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:411:in `hook' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:402:in `exit_on_fail' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute' /usr/local/bin/puppet:4 ESC[1;35merr: Could not create resources for managing Puppet's files and directories in sections [:main, :ssl]: Could not find a default provider for userESC[0m ESC[0;32minfo: Creating a new SSL key for caESC[0m ESC[0;37mdebug: Puppet::Type::User::ProviderUseradd: file chage does not existESC[0m ESC[0;37mdebug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not existESC[0m ESC[0;37mdebug: Puppet::Type::User::ProviderLdap: true value when expecting falseESC[0m ESC[0;37mdebug: Puppet::Type::User::ProviderPw: file pw does not existESC[0m ESC[0;37mdebug: Puppet::Type::User::ProviderDirectoryservice: file / usr/bin/dscl does not existESC[0m /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1402:in `defaultprovider' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1509:in `default' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:540:in `set_default' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1762:in `initialize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:457:in `new' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:457:in `service_user_available?' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 45:in `use_service_user?' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings/file_setting.rb: 40:in `owner' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:718:in `writesub' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:709:in `write' /usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/ssl_file.rb:156:in `write' /usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/ssl_file.rb:98:in `save' /usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/key/file.rb:34:in `save' /usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb: 264:in `save' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/host.rb:147:in `generate_key' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/host.rb:176:in `certificate' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 222:in `setup' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 146:in `initialize' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 31:in `new' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 31:in `init_singleton_instance' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:106:in `send' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:106:in `cached_value' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:98:in `cached_value' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:48:in `singleton_instance' /usr/local/lib/ruby/site_ruby/1.8/puppet/ssl/certificate_authority.rb: 45:in `instance' /usr/local/lib/ruby/site_ruby/1.8/puppet/application/master.rb:236:in `setup' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:411:in `hook' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:402:in `exit_on_fail' /usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute' /usr/local/bin/puppet:4 Default user provider should be useradd(8). ProviderUseradd is looking for 'chage' binary which isn't used on OpenBSD. The 'Puppet OpenBSD' doc doesn't have anything applicable. This seems to be related to #4963 (Solaris) where a workaround was to use passwd(1) instead of chage and updated options for min/max password age. Applying the following modifications works around the issue although is not likely to be correct: --- useradd.rb.bak Fri Sep 16 23:26:59 2011 +++ useradd.rb Sat Sep 17 00:15:03 2011 @@ -3,13 +3,13 @@ Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameService::ObjectAdd do desc "User management via `useradd` and its ilk. Note that you will need to install the `Shadow Password` Ruby library often known as ruby-libshadow to manage user passwords." - commands :add => "useradd", :delete => "userdel", :modify => "usermod", :password => "chage" + commands :add => "useradd", :delete => "userdel", :modify => "usermod", :password => "passwd" options :home, :flag => "-d", :method => :dir options :comment, :method => :gecos options :groups, :flag => "-G" - options :password_min_age, :flag => "-m" - options :password_max_age, :flag => "-M" + options :password_min_age, :flag => "-e" + options :password_max_age, :flag => "-f" verify :gid, "GID must be an integer" do |value| value.is_a? Integer I suspect a modified provider is required for OpenBSD since the useradd(8) utility doesn't support the -m/-M options for min/max age, but rather supports these options instead for account and password expiration: -e expiry-time Sets the default time at which new accounts will expire. It should be entered in the form ``month day year'', where month is the month name (the first three characters are sufficient), day is the day of the month, and year is the year. Time in seconds since the Epoch (UTC) is also valid. A value of 0 can be used to disable this feature. -f inactive-time Sets the time at which passwords of new accounts will expire. Also see the -e option above. OpenBSD's useradd(8) is derived from NetBSD's so the same situation is likely to occur there. [[http://www.openbsd.org/cgi-bin/man.cgi?query=useradd&sektion=8]] [[http://netbsd.gw.com/cgi-bin/man-cgi?useradd+8+NetBSD-current]] -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
