Implement a general function to detect features in shadow host.
Apparently, musl doesn't provide `getent gshadow`, but shadow still needs
it to check for several group attributes. Thus, check whether it exists
in the host, and if it does run it. If not, let's just skip that part of
the test.
Link: <https://gitlab.alpinelinux.org/alpine/aports/-/issues/16979> Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com> Reviewed-by: Dan Lavu <dlavu@redhat.com>