Use effective uid to check sudo