Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
NSS_NDB(8)		    nss_ndb 1.0.24 man page		    NSS_NDB(8)

NAME
       nss_ndb - BerkeleyDB nsswitch backend for passwd	and group data

DESCRIPTION
       The  nss_ndb nsswitch backend is	a shared library that enables usage of
       BerkeleyDB btree	database files as a backend for	passwd and group data.
       It is tuned to be fast and efficient for	large installations  (>100,000
       entries	in  passwd & group databases) and handle users being member of
       many groups efficiently.

CONFIGURATION
       First make sure there is	a symbolic link	from /usr/lib/nss_ndb.so.1  to
       the real	location of the	nss_ndb.so.<version> library.

       Second step is to populate the databases	in the /var/db/nss_ndb/	direc-
       tory.

       Third  step  is to activate the use of nss_ndb in the (R)file by	adding
       the ndb keyword on the passwd and group lines

       Depending on how	nss_ndb	was built support  for	a  configuration  file
       and/or a	configuration environment variable (by default NSS_NDB_CONFIG)
       may (but	normally isn't)	have been enabled. The environment variable is
       probably	mostly useful for debugging purposes and uses the same options
       as  the	configuration file but are specified as	a comma-separated list
       of  key:val  pairs.  For	 details  of  the  configuration   file	  see:
       nss_ndb.conf(5)

       You  can	 check	if  nss_ndb was	built with support for a configuration
       file and/or variable by:

	      $	strings	/usr/lib/nss_ndb.so.1 |	fgrep nss_ndb.conf
	      $	strings	/usr/lib/nss_ndb.so.1 |	fgrep NSS_NDB_CONFIG

DATABASE
       The databases are normally stored in (R)and can be  populated  via  the
       makendb tool from text files.

       A  more	efficient  way	is  to use a sync tool to update the local NDB
       databases from a	remote source regularily (like a MySQL server,	or  an
       AD  or  LDAP  server).  An  example sync	tool talking to	a MySQL	server
       written in Perl is available as ndbsync(8) which	can  be	 modified  for
       your  purposes.	If you write your own -	make sure you do not forget to
       lock (using flock (2)) the databases before updating them in  order  to
       maintain	consistency.

       All  tables  use	 UTF-8.	All values include a terminating NUL character
       and have	the following format:

       passwd.byname
	 Key: user-name
	 Data: user:password:uid:gid:class:change:expire:gecos:home:shell

       passwd.byuid
	 Key: uid
	 Data: user:password:uid:gid:class:change:expire:gecos:home:shell

       group.byname
	 Key: group-name
	 Data: group:password:gid:user,user,user,...

       group.bygid
	 Key: gid
	 Data: group:password:gid:user,user,user,...

       group.byuser
	 Key: user
	 Data: user:gid,gid,gid,...

EXAMPLES
       passwd.byname:
	 Key:
	   anna
	 Data:
	   anna:*:1000036:1000000::0:0:Anna Andersson:/home/anna:/bin/sh^@

       passwd.byuid
	 Key:
	   1000036
	 Data:
	   anna:*:1000036:1000000::0:0:Anna Andersson:/home/anna:/bin/sh^@

       group.byname
	 Key:
	   wheel
	 Data:
	   wheel:*:0:root,peter,mike,john,anna^@

       group.bygid
	 Key:
	   0
	 Data:
	   wheel:*:0:root,peter,mike,john,anna^@

       group.byuser
	 Key:
	   anna
	 Data:
	   anna:1000000,0,101,102^@

FILES
       /usr/local/share/examples/nss_ndb/ndbsync

       /var/db/nss_ndb

SEE ALSO
       makendb(8),  nsstest(8),	 nss_ndb.conf(5),   nsswitch.conf(5),	nsdis-
       patch(3), https://github.com/ptrrkssn/nss_ndb

AUTHOR
       nss_ndb and tools was written by	Peter Eriksson <pen@lysator.liu.se>.

1.0.24				  12 Jun 2020			    NSS_NDB(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=nss_ndb&sektion=8&manpath=FreeBSD+Ports+15.0>

home | help