"+::::::" at the end of /etc/passwd

Solution 1:

As Lukas Räpple pointed out in the comments, that line is a legacy entry for using NIS with ancient libc5.

If you want to keep using NIS but remove that line, change the passwd: compat line in /etc/nsswitch.conf to passwd: files nis first. You should also check the shadow: and group: lines (and /etc/group and /etc/shadow files) for similar legacy settings.

Solution 2:

I'm reposting the below from the following Unix stackexchange answer:


The answer lies in the nsswitch.conf(5) man page:

Interaction with +/- syntax (compat mode)

Linux libc5 without NYS does not have the name service switch but does allow the user some policy control. In /etc/passwd you could have entries of the form +user or [email protected] (include the specified user from the NIS passwd map), -user or [email protected] (exclude the specified user), and + (include every user, except the excluded ones, from the NIS passwd map).

You can override certain passwd fields for a particular user from the NIS passwd map by using the extended form of +user:::::: in /etc/passwd. Non-empty fields override information in the NIS passwd map.

Since most people only put a + at the end of /etc/passwd to include everything from NIS, the switch provides a faster alternative for this case (passwd: files nis) which doesn’t require the single + entry in /etc/passwd, /etc/group, and /etc/shadow. If this is not sufficient, the NSS compat service provides full +/- semantics. By default, the source is nis, but this may be overridden by specifying nisplus as source for the pseudo-databases passwd_compat, group_compat and shadow_compat. These pseudo-databases are only available in GNU C Library.