Fixes #5030 compare connection user and sudo user and disable sudo if identical