chsh: /etc/passwd.20598: Permission denied

I've given an Ubuntu 18.04 box with user account which have root permission but not use /bin/bash as default shell. Hence, when I ssh to it, when I hit left, right, up, down ←↑→ keys, it will produces ^[[D ^[[A ^[[C

I want to change the user to default use /bin/bash shell with

sudo chsh -s /bin/bash {MY_USERNAME} 

but the terminal says:

chsh: /etc/passwd.20598: Permission denied
chsh: cannot lock /etc/passwd; try again later

How could I fix it?

5 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like