Use getlpid function for getting group id of cups