make samba module more flexible