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

4 thoughts to “sudo su – Cannot execute something: No such file or directory”

  1. Quand j’ai suivi vos explications, cela a parfaitement marché. Dans mon cas, dans le fichier /etc/passwd, j’avais ceci :
    root:x:0:0:root:/root:somefile
    et je l’ai remplacé par :
    root:x:0:0:root:/root:/bin/bash

    et ça a marché.

    Thank you very match.

Leave a Reply