sudo su – Cannot execute something: No such file or directory

I’ve been getting an error when I type “sudo su”. It says:

"Cannot execute somefile: No such file or directory"

This was caused by the shell for root was incorrectly set. To fix it, I edit the passwd:

sudo nano /etc/passwd

Then I edited the line for root from:

root:x:0:0:root:/root:somefile

to

root:x:0:0:root:/root:/bin/bash

3 thoughts on “sudo su – Cannot execute something: No such file or directory

Leave a Reply