Use sys_getgrnam not getgrnam. Pointed out by Herb.