The getent command displays entries from databases supported by the Name Service Switch libraries, which are configured in /etc/nsswitch.conf. If one or more key arguments are provided, then only the entries that match the supplied keys will be displayed. Otherwise, if no key is provided, all entries will be displayed (unless the database does not support enumeration).
My DS713+ (Intel based Synology NAS) does not have in on board, its Entware repository neither, but using “locate” I spotted a binary in a docker installation. It looks, like it is compiled for Debian, but it runs anyway.
- https://cygwin.com/packages/x86_64/getent/ – getent on cygwin
getent on macOS: basically it’s not there and there is no way to get it, and it does not make sense to emulate it; use the right tools on macOS!
- http://zzamboni.org/brt/2008/01/21/how-to-emulate-unix-getent-with-macosxs-dscl/
- https://apple.stackexchange.com/questions/44567/how-can-i-install-getent-on-snow-leopard
- https://unix.stackexchange.com/questions/373309/mac-os-command-to-resolve-hostnames-like-getent-on-linux
- https://superuser.com/questions/279891/list-all-members-of-a-group-mac-os-x/395738
- https://www.cyberciti.biz/faq/check-list-users-unix/