A
A
arruah2017-01-21 22:46:26
Command line
arruah, 2017-01-21 22:46:26

How to use su command with shell?

For a sudo user, the shell in /etc/passwd was changed to /bin/zsh, but zsh itself was not installed.
Now, when trying to log in to the console under this user, we have
Cannot execute /bin/zsh: No such file or directory
System remote, there is no way to log in as root and change the entry in /etc/passwd, root login via ssh is disabled.
There is a user without sudo.
Underneath I try to use su with the -s option, but it doesn't work and I get an error
Cannot execute /bin/zsh: No such file or directory
. Is there any method to solve this problem? Or is it left to ask the local admin to log in from the console as root and change the /etc/passwd file with the correct shell /bin/bash line?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Wexter, 2017-01-22
@Wexter

su -c /bin/bash

V
Vitaly, 2017-01-22
@vshvydky

Sudo vim /etc/passwd
Sudo apt-get install zsh
Su - -/bin/bash

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question