replace subprocess with pexpect for `su`