chsh git -s /bin/bash
should fix it (I prefer to use the chsh
program instead of editing /etc/passwd
by hand to change an account's login shell)
I changed /etc/passwd to git-shell and changed it back, but now shell not working
Question
I was following the instruction on how to set up a git server here, and I removed the ssh access from the git
user by setting /etc/passwd
file to /usr/bin/git-shell
.
Later I found out that I still want to ssh as git
, so I reset it back to /bin/sh
. I could ssh back, but the shell prompt looked all strange today. Previously, the prompt was
git@xyz.com $
but now it's just
$
Tab Autocomplete is gone. History is also gone. I am not sure what files got removed when I switched to git-shell
. How do I recover from this?
Solution
OTHER TIPS
Maybe it was not /bin/sh
before, try setting it as
/bin/bash
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow