minor patches to make the pull request work in common case (no passwd)