Bug 1475995 - puppet useradd provider needs ruby-shadow gem and fails silently
puppet useradd provider needs ruby-shadow gem and fails silently
Status: NEW
Product: Fedora
Classification: Fedora
Component: puppet (Show other bugs)
26
Unspecified Linux
unspecified Severity high
: ---
: ---
Assigned To: Jeroen van Meeuwen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-27 13:54 EDT by Shawn Bohrer
Modified: 2017-08-10 10:27 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shawn Bohrer 2017-07-27 13:54:45 EDT
Description of problem:
Using the puppet user module to change or set a users password in /etc/shadow does not work.  Running puppet with --debug I see this:

Provider useradd does not support features manages_passwords; not managing attribute password

This message appears when ruby-shadow is not present.  Yet I have ruby-shadow installed.  F26's ruby-shadow-1.4.1-31.fc26.x86_64 is rather old and 'gem list' does not show ruby-shadow as an installed gem.  I built the latest ruby-shadow 2.5.0 on my systems and this fixes the problem, so I suspect someone simply needs to build an updated ruby-shadow rpm.

Version-Release number of selected component (if applicable):
puppet-4.6.2-4.fc26.noarch
ruby-shadow-1.4.1-31.fc26.x86_64

How reproducible:
Very

Steps to Reproduce:
puppet apply -tv --execute "user {'bob': password => 'alice', }"
grep bob /etc/shadow
Comment 1 Evgheni Dereveanchin 2017-08-04 06:44:36 EDT
Hit this issue as well - puppet in my case fails to load the existing library:

Debug: Failed to load library 'shadow' for feature 'libshadow'

Looking deeper, the whole library seems broken:

# irb
irb(main):001:0> require 'shadow'
LoadError: /usr/lib64/ruby/vendor_ruby/shadow.so: undefined symbol: rb_iterator_p - /usr/lib64/ruby/vendor_ruby/shadow.so
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
        from (irb):1
        from /usr/bin/irb:11:in `<main>'


# dnf info ruby-shadow
Installed Packages
Name         : ruby-shadow
Version      : 1.4.1
Release      : 31.fc26
Arch         : x86_64
Size         : 21 k
Source       : ruby-shadow-1.4.1-31.fc26.src.rpm
Repo         : @System
From repo    : fedora
Summary      : Ruby bindings for shadow password access
URL          : http://ttsky.net/
License      : Public Domain
Description  : Ruby bindings for shadow password access

Is there an easy fix for this without having to bring in a non-standard library into the system?
Comment 2 Joel Nimety 2017-08-10 10:27:02 EDT
Just ran into this too, upgrading from Fedora 24 to Fedora 26. For what it's worth, 1.4.1 looks extremely outdated: https://rubygems.org/gems/ruby-shadow and https://github.com/apalmblad/ruby-shadow/blob/master/HISTORY

Note You need to log in before you can comment on or make changes to this bug.