s io="whoami" o io:"rq" u io r x u 0 w x
Above command gave username as "irisusr" which was not the user added to /etc/sudoers file.
This was the issue. (User logged in the VM was "ubuntu" and I tried adding this user to the file)
When "irisusr" was added in /etc/sudoers file, sudo commands seems to be working.
Additionally, I tried the command
w $ZF(-100, "/SHELL", "sudo whoami")
which was not correct, it should have been
w $ZF(-100, "/SHELL", "sudo","whoami")
sudo commands are working now.
- Log in to post comments