use helper methods from system.samba. #515