I am working on a menu...
and the menu has some options like check status for services (gmonitor group) or stop - start - restart those same services (gadmin group)
as you see there are 2 main groups gmonitor for monitoring and gadmin for restart - stop - start services
so checking command groups
root : root bin daemon sys adm disk wheel ivmgr httpd gadmin
cgonza : cgonza testing gmonitor
basically I want to read the output from groups command and atfer that
if group gadmin is found allow the user to restart services and if gmonitor group is found deny access to restart services
the point is I don't know how to get that groupvar
if [ "$groupvar" == "gadmin" ]
restart services options
echo "... you are not allowed to ..."
thanks a lot