added more robust calls for debian and user_groups