issue with ubuntu/nomachine on ec2

Job ID: 37114520

Budget: €8 – €30 EUR

I use ubuntu 14.04lts on amazon ec2 and i had saved the data/software in an AMI.
i had saved the AMI a few years ago and now when i launch a spot instance on it some features stopped to work:

1.i cannot use the sudo command < i have the error: "/usr/bin/sudo must be owned by uid 0 and have the setuid bit set"
2. i cannot remote connect using nomachine when i use the pem file (https://kb.nomachine.com/AR11N00908). the strange thing is that i can connect using ssh with the pem file.

so i need someone who is familiar with configuration with ec2,ubuntu and nomachine to solve those two issues
Related categories: System Admin Linux Amazon Web Services Ubuntu