{"id":34938839,"url":"https://github.com/cavaliercoder/puppet-nscd","last_synced_at":"2026-05-23T03:08:36.098Z","repository":{"id":57664332,"uuid":"58798582","full_name":"cavaliercoder/puppet-nscd","owner":"cavaliercoder","description":"Puppet module to install, configure and manage the Name Service Cache Daemon","archived":false,"fork":false,"pushed_at":"2024-01-17T09:10:04.000Z","size":11,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-14T06:15:21.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cavaliercoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-14T08:52:00.000Z","updated_at":"2016-05-15T07:43:07.000Z","dependencies_parsed_at":"2022-09-10T14:20:28.592Z","dependency_job_id":null,"html_url":"https://github.com/cavaliercoder/puppet-nscd","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cavaliercoder/puppet-nscd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cavaliercoder%2Fpuppet-nscd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cavaliercoder%2Fpuppet-nscd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cavaliercoder%2Fpuppet-nscd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cavaliercoder%2Fpuppet-nscd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cavaliercoder","download_url":"https://codeload.github.com/cavaliercoder/puppet-nscd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cavaliercoder%2Fpuppet-nscd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33380817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T01:21:08.577Z","status":"online","status_checked_at":"2026-05-23T02:00:05.530Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-26T18:48:19.314Z","updated_at":"2026-05-23T03:08:36.092Z","avatar_url":"https://github.com/cavaliercoder.png","language":"Puppet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nscd\n\n#### Table of Contents\n\n1. [Description](#description)\n1. [Setup - The basics of getting started with nscd](#setup)\n1. [Usage - Configuration options and additional functionality](#usage)\n1. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n1. [Limitations - OS compatibility, etc.](#limitations)\n1. [Development - Guide for contributing to the module](#development)\n\n## Description\n\nThe nscd module installs, configures and manages the name service cache daemon\non unix-like operating systems.\n\n## Setup\n\n### What nscd affects\n\n* The `nscd` package will be installed unless `package_manage` is set to `false`\n* The `nscd.conf` configuration file will be overwritten unless `config_manage`\n  is set to `false`\n\n### Beginning with nscd\n\nDeclare the main `::nscd` class and apply default cache configurations:\n\n```puppet\nclass { '::nscd' : service_defaults =\u003e true }\n\n```\n\n## Usage\n\nDaemon configuration is managed through the main `::nscd` class while individual\nservice caches (such as `passwd` or `group`) are managed using declarations of\nthe `::nscd::cache` resource type.\n\n### Install and start nscd with binary defaults\n\n```puppet\nclass { '::nscd' : }\n\n```\n\nThis will install the nscd package, configure daemon defaults and start the\n`nscd` service. No caches will be configured or enabled.\n\n### Install and start nscd with distribution defaults\n\n```puppet\nclass { '::nscd' : service_defaults =\u003e true }\n\n```\n\nThis will install the nscd package, configure daemon defaults, enable and\nconfigure service caches as per the defaults for your operating system and\nfinally start the nscd service.\n\n### Install and start nscd with custom service cache configurations\n\n```puppet\nclass { '::nscd' : }\n\nnscd::cache { 'passwd' : \n  positive_ttl   =\u003e 600,\n  negative_ttl   =\u003e 20,\n  persistent     =\u003e true,\n  shared         =\u003e true,\n  auto_propagate =\u003e true,\n}\n\nnscd::cache { 'group' : \n  positive_ttl   =\u003e 3600,\n  negative_ttl   =\u003e 60,\n  persistent     =\u003e true,\n  shared         =\u003e true,\n  auto_propagate =\u003e true,\n}\n\n```\n\nThis will install the nscd package, configure daemon defaults, enable and\nconfigure service caches for `passwd` and `group` and finally start the nscd\nservice.\n\n## Reference\n\n- [**Public classes**](#public-classes)\n    - [Class: nscd](#class-nscd)\n- [**Private classes**](#private-classes)\n    - [Class: nscd::config](#class-nscdconfig)\n    - [Class: nscd::install](#class-nscdinstall)\n    - [Class: nscd::params](#class-nscdparams)\n    - [Class: nscd::service](#class-nscdservice)\n    - [Class: nscd::service_defaults](#class-nscdservice_defaults)\n- [**Public defined types**](#public-defined-types)\n    - [Defined type: nscd::cache](#defined-type-nscdcache)\n\n### Public classes\n\n#### Class: `nscd`\n\nGuides the basic setup and installation of the name service cache daemon on your\nsystem.\n\nWhen this class is declared with the default options, Puppet:\n\n* Installs the `nscd` software package for your operating system\n* Replaces and manages the `nscd.conf` configuration file\n  * Distribution defaults are used for the daemon itself\n  * Binary defaults are used for all supported caches unless `service_defaults`\n    is set to `true` in which case distribution defaults are configured\n* Enables and starts the `nscd` service\n\nYou can validate the state of nscd and its caches by calling\n\n  $ nscd --statistics\n\n**Parameters within `nscd`:**\n\n##### `config_file`\n\nSet the path fo the nscd configuration file to be managed. \nDefault: `/etc/nscd.conf`\n\n##### `config_manage`\n\nDetermines whether to manage the nscd daemon configuration file. If `false`,\nthe configuration file must be managed manually and `::nscd::cache` definitions\nwill fail. Valid options: Boolean. Default: true.\n\n##### `debug_level`\n\nSets the desired debug level for the log file. Default: 0.\n\n##### `log_file`\n\nSet the path of the daemon log file. Default: `/var/log/nscd.log`.\n\n##### `max_threads`\n\nSets the maximum number of threads. Default: 32.\n\n##### `package_ensure`\n\nControls the `package` resource's [`ensure`][] attribute. Valid options:\n'absent', 'installed' (or the equivalent 'present'), or a version string. \nDefault: 'installed'.\n\n##### `package_manage`\n\nDetermines whether the `nscd` package will be installed and managed. Set to\n`false` if you wish to manually manage the installation. Valid options: Boolean.\nDefault: true.\n\n##### `package_name`\n\nSets the names of the package to be installed. Default: `nscd`.\n\n##### `paranoia`\n\nDetermines whether to enable paranoia mode which causes nscd to restart itself\nperiodically. Valid options: Boolean. Default: true.\n\n##### `reload_count`\n\nSets the limit on the number of times a cached entry gets reloaded without being\nused before it gets removed. Default: 5.\n\n##### `restart_interval`\n\nSets the restart interval to time seconds if periodic restart is enabled by\nenabling paranoia mode. Default: 3600 (1 hour).\n\n##### `service_defaults`\n\nDetermines whether default cache service configurations should be applied by\nincluding the `::nscd::service_defaults` class and its `::nscd::cache`\ndeclarations. Valid options: Boolean. Default: true.\n\n##### `service_enable`\n\nDetermines whether Puppet enables the nscd service when the system is booted.\nValid options: Boolean. Default: true.\n\n##### `service_ensure`\n\nDetermines whether Puppet should make sure the service is running. Valid\noptions: 'true' (equivalent to 'running'), 'false' (equivalent to 'stopped').\nDefault: 'running'.\n\n##### `service_manage`\n\nDetermines whether Puppet manages the nscd service's state. Valid options:\nBoolean. Default: true.\n\n##### `service_name`\n\nSets the name of the nscd service. Default: `nscd`.\n\n##### `service_user`\n\nSets the name of the service account under which the nscd service will run.\nDefault: `nscd`.\n\n##### `service_user_gid`\n\nSets the group ID of the nscd service account. Default: 28.\n\n##### `service_user_manage`\n\nDetermines whether Puppet manages the nscd service account. Valid options:\nBoolean. Default: true.\n\n##### `service_user_uid`\n\nSets the user ID of the nscd service account. Default: 28.\n\n##### `stat_user`\n\nSpecifies the user who is allowed to request statistics.\n\n##### `threads`\n\nSet the number of threads that are started to wait for requests. At least five\nthreads will always be created. Default: 4.\n\n### Private classes\n\n#### Class: `nscd::config`\n\nManages the nscd configuration file.\n\n#### Class: `nscd::install`\n\nInstalls the nscd package.\n\n#### Class: `nscd::params`\n\nManages nscd parameters for different operating systems.\n\n#### Class: `nscd::service`\n\nManages the nscd daemon and runtime user account.\n\n#### Class: `nscd::service_defaults`\n\nDefines default `::nscd::cache` configurations for the targeted operating\nsystem.\n\n### Public defined types\n\n#### Defined type: `nscd::cache`\n\nDefines the configuration for a supported service cache.\n\n**Parameters within `nscd::cache`:**\n\n##### `name`\n\nSets the name of the service to be configured.\n\n##### `auto_propagate`\n\nWhen set to `false` for `passwd` or `group` service, then the `.byname` requests\nare not added to `passwd.byuid` or `group.bygid` cache. This can help with\ntables containing multiple records for the same ID. This parameter is valid only\nfor services `passwd` and `group`. Default: `undef`.\n\n##### `check_files`\n\nEnables or disables checking the file belonging to the specified service for\nchanges. Valid options: Boolean. Default: true.\n\n##### `enable`\n\nEnables or disables the specified service cache. Valid options: Boolean.\nDefault: true.\n\n##### `max_db_size`\n\nThe maximum allowable size, in bytes, of the database files for the service.\nDefault: 33554432 (32MB).\n\n##### `negative_ttl`\n\nSets the TTL (time-to-live) for negative entries (unsuccessful queries) in the\nspecified cache for service. Value is in seconds. Can result in significant\nperformance improvements if there are several files owned by UIDs (user IDs) not\nin system databases (for example untarring the Linux kernel sources as root);\nshould be kept small to reduce cache coherency problems. Required. \nDefault: `undef`.\n\n##### `persistent`\n\nKeep the content of the cache for service over server restarts; useful when\nparanoia mode is set. Valid options: Boolean. Default: false.\n\n##### `positive_ttl`\n\nSets the TTL (time-to-live) for positive entries (successful queries) in the\nspecified cache for service. Value is in seconds. Larger values increase cache\nhit rates and reduce mean response times, but increase problems with cache\ncoherence. Required. Default: `undef`.\n\n##### `shared`\n\nThe memory mapping of the nscd databases for service is shared with the clients\nso that they can directly search in them instead of having to ask the daemon\nover the socket each time a lookup is performed. Valid options: Boolean.\nDefault: false.\n\n##### `suggested_size`\n\nSets the the internal hash table size. Value should remain a prime number for\noptimum efficiency. Default: 211.\n\n## Limitations\n\n### Debian/Ubuntu\n\nAs per [Ubuntu bug 1068889](https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1068889),\nthe `netgroup` service cache is known not to work on Debian based systems and is\ntherefore disable by default by this module.\n\n## Development\n\nContributions are welcome in the form of issues and pull requests on\n[GitHub](https://github.com/cavaliercoder/puppet-nscd).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcavaliercoder%2Fpuppet-nscd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcavaliercoder%2Fpuppet-nscd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcavaliercoder%2Fpuppet-nscd/lists"}