1

We have a server with ssh enabled, and we have: PermitRootLogin: no, and a user that is not in sudoers file. Another administator set invalid Shell for root so I can't get root access anymore. When I run su command and enter root password it says: su: failed to execute /bin/vash. I think the admin wanted to set bash as default Shell but here is a typo. How can I access root again?

Ivan
  • 25

2 Answers2

1

From man su:

   -s, --shell=shell
          Run the specified shell instead of the default.

So try:

su root -s /bin/sh

Then run chsh to reset the shell to a valid default

moo
  • 966
0

Oh guys I've fixed that))) Here is my solution:

cp /bin/bash ~/vash
export PATH = "$PATH:~"
alias "/bin/vash"="/home/USER/vash"
su
Ivan
  • 25