I am currently trying to escalate my privileges on an Ubuntu box. When I enumerated the server and run "sudo -l" command, I found out /usr/bin/vi set to (root) NOPASSWD.
(root) NOPASSWD: /usr/bin/vi /var/www/html/*
Then I wanted to use vi for my purpose to escalate my privs to root, so I wanted to create a file with running the command below, so I can run my shell in vi.
sudo /usr/bin/vi somefile.txt
Then I got this error:
sudo: no tty present and no askpass program specified
If someone help me with this issue, it is really appreciated.
I just would like to able to run this command without error:
sudo /usr/bin/vi somefile.txt