My knowledge on unix is very less. I updated .profile file for sudo user but some path was incorrect in that file. When I am trying to reconnect as a sudo user it does not recognize any commands and its not allowing me to edit the .profile file either. I tried to copy the correct .profile from my own profile but it does not recognize any commands.
How can I fix the corrupted .profile file for a sudo user ?
Edit 1: Below is the error when i try to edit the .profile -
-ksh: vim: not found [No such file or directory]
I tried this - /usr/bin/sudo nano ~/.profile? but I am not able to login because i dont have root privileges.
/home/dts/etc>/usr/bin/sudo nano ~/.profile?
sudo: 3 incorrect password attempts
Edit 2: Tried to copy/move the .profile from another sudo account but it does not recognize any commands
/home/dts/etc>cp /home/sq73223/.profile_dts /home/dts/.profile -ksh: cp: not found [No such file or directory] /home/dts/etc>mv /home/sq73223/.profile_dts /home/dts/.profile -ksh: mv: not found [No such file or directory] /home/dts/etc>whoami -ksh: whoami: not found [No such file or directory]