Changed sudo command to tempgroup

Also changed the permission and function name if that's ok.