nerdexam
Linux_Foundation

LFCS · Question #182

In order to migrate usernames and passwords from a NIS server, the passwd and shadow files were used with a custom script to import the data to OpenLDAP. After properly creating a test workstation…

The correct answer is A. The NIS database is not synchronized with passwd and shadow. A discrepancy in getent passwd output after migrating from NIS to OpenLDAP suggests an inconsistency in the original NIS database or the passwd and shadow files used for migration. This indicates the source data itself was not a complete or synchronized representation of users.

Submitted by ravi_2018· Apr 18, 2026User and Group Management

Question

In order to migrate usernames and passwords from a NIS server, the passwd and shadow files were used with a custom script to import the data to OpenLDAP. After properly creating a test workstation to authenticate against LDAP, the number of lines outputted from getent passwd are different from the number on the NIS client workstation. Which one of the following statements can be true?

Options

  • AThe NIS database is not synchronized with passwd and shadow.
  • BThe OpenLDAP server creates some additional users that are shown in getent.
  • CThe NIS clients are not receiving the correct files from the server.
  • DThe NIS clients are confused since OpenLDAP and NIS use the same port to communicate.
  • EThe OpenLDAP client is querying the NIS server on the wrong TCP/IP port.

How the community answered

(33 responses)
  • A
    76% (25)
  • B
    3% (1)
  • D
    15% (5)
  • E
    6% (2)

Why each option

A discrepancy in `getent passwd` output after migrating from NIS to OpenLDAP suggests an inconsistency in the original NIS database or the `passwd` and `shadow` files used for migration. This indicates the source data itself was not a complete or synchronized representation of users.

AThe NIS database is not synchronized with passwd and shadow.Correct

If the number of users listed by `getent passwd` differs between the original NIS client and the OpenLDAP client after migration, it strongly suggests that the initial source `passwd` and `shadow` files used to populate OpenLDAP were not a complete or synchronized representation of the active NIS database, leading to an incomplete data import.

BThe OpenLDAP server creates some additional users that are shown in getent.

OpenLDAP serves the user data it has been configured with and does not spontaneously create additional users that would then appear in `getent` output.

CThe NIS clients are not receiving the correct files from the server.

While NIS clients might not receive correct files, the core problem for a migration discrepancy usually lies in the integrity of the data extracted from the NIS server for the OpenLDAP import, rather than client-side reception issues.

DThe NIS clients are confused since OpenLDAP and NIS use the same port to communicate.

NIS and OpenLDAP utilize different network ports for communication, making a port conflict an unlikely cause for discrepancies in user counts during migration.

EThe OpenLDAP client is querying the NIS server on the wrong TCP/IP port.

The `getent` command queries configured name services according to `nsswitch.conf`; if the OpenLDAP client were querying NIS, it would be a misconfiguration, but it doesn't explain the *difference* in counts from the original NIS client after a migration attempt.

Concept tested: NIS to LDAP migration data integrity

Source: https://man7.org/linux/man-pages/man5/nsswitch.conf.5.html

Topics

#NIS#OpenLDAP#User Management#Data Migration

Community Discussion

No community discussion yet for this question.

Full LFCS Practice