Here is what happened: I used fish shell as default shell for pi account. I removed it but didn't change the default shell and now I am unable to log in. Luckily I have another account but it doesn't have sudo privilege (so I cannot just change /etc/passwd
file).
I tried:
su --shell /bin/sh pi
or
su -s /bin/bash pi
So it won't try to use fish.
But it seems it is just ignoring the --shell
option:
Password:
Cannot execute /usr/bin/fish: No such file or directory
What else can I do to regain access to my pi account?
su
just change the user, it is not the same assudo
. It doesn't need root permissions. You'll have to know the other user's password though. The "Password" out put was where I typed the pi user password. It worked, but it ignored my option to use sh shell and tried to use fish, which is not installed anymore-rwsr-xr-x 1 root root 31092 Jun 5 2012 /bin/su
Anyone can execute it. And I think it really wouldn't make sense otherwise. Maybe what you mean is that one cannotsu
to root user, which is true indeed.