I have a server running where I use php to run a bash script to verify certain information of a user. For example, I have a webhosting server set up, and in order to be able to
Try doing this :
username=ANY_USERNAME if getent group customers | grep -q "\b${username}\b"; then echo true else echo false fi
or
username=ANY_USERNAME if groups $username | grep -q '\bcustomers\b'; then echo true else echo false fi