Giter VIP home page Giter VIP logo

puppet-nslcd's People

Contributors

geekix avatar kobybr avatar mastermind2k avatar natemccurdy avatar oasys avatar t0xiccode avatar virus2500 avatar werekraken avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

puppet-nslcd's Issues

LDAP URI structure isn't compatible with 'authconfig'

The code that specified the LDAP URI isn't compatible with the command line 'authconfig' or the puppet module MyLezeem/puppet-authconfig
(https://github.com/Mylezeem/puppet-authconfig).

When running 'authconfig --update', authconfig condenses the LDAP URIs into a single line. This causes puppet-nslcd to see that /etc/nslcd.conf file has changed and puppet-nslcd will change /etc/nslcd.conf back to a [potentially] multi-line URI.

<% @ldap_uris.each do |ldap_uri| -%>
uri <%= ldap_uri %>
<% end -%>

I recommend changing the three lines in templates/nslcd.erb thusly:

The location at which the LDAP server(s) should be reachable.

uri <%= @ldap_uris.join(' ').sort %>

This will make puppet-nslcd more compatible with command line authconfig and as a bonus, more compatible with MyLezeem/puppet-authconfig (https://github.com/Mylezeem/puppet-authconfig) module.

What is the format of $ldap_maps?

Can someone give me an example of $ldap_maps format?

I've tried:
$ldap_maps = { group => 'uniqueMember member', passwd => ['homedirectory unixHomeDirectory', 'uid sAMAccountName', 'gecos displayName', ], shadow => ['shadowLastChange pwdLastSet', 'uid sAMAccountName', ], }

...but the module incorrectly updates /etc/nslcd.conf thusly:

Custom maps

map group uniqueMember member
map passwd ["homedirectory unixHomeDirectory", "uid sAMAccountName", "gecos displayName"]
map shadow ["shadowLastChange pwdLastSet", "uid sAMAccountName"]

$package_name and $service_name can conflict with other Puppet modules

I'm using both your nslcd and the authconfig module from https://github.com/Mylezeem/puppet-authconfig.

Since the authconfig module also includes nss-pam-ldapd for Red Hat, the Package 'nss-pam-ldapd' is defined twice when including both authconfig and nslcd. The same goes for the 'nslcd' service.

I have changed my fork of init.pp to check to see if $service_name and/or $package_name are undefined. If either are undefined, the manifest modifies the anchor statement to include/exclude the appropriate service or package.

Due to the possibility of duplicate resource declarations with other modules

(ie: https://github.com/Mylezeem/puppet-authconfig), check to see if

$package_name is undefined. If it is undefined then don't attempt to

install it. The same is true for $service_name.

if $package_name == undef and $service_name == undef {
anchor { 'nslcd::begin': } ->
class { 'nslcd::config': } ~>
anchor { 'nslcd::end': }
} elsif $package_name == undef {
anchor { 'nslcd::begin': } ->
class { 'nslcd::config': } ~>
class { 'nslcd::service': } ->
anchor { 'nslcd::end': }
} elsif $service_name == undef {
anchor { 'nslcd::begin': } ->
class { 'nslcd::install': } ->
class { 'nslcd::config': } ~>
anchor { 'nslcd::end': }
} else {
anchor { 'nslcd::begin': } ->
class { 'nslcd::install': } ->
class { 'nslcd::config': } ~>
class { 'nslcd::service': } ->
anchor { 'nslcd::end': }
}

This is my first experience with anchors. If there's a better way to do this (ie: define the anchor) please feel free to let me know.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.