0

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?

garbagecollector
  • 3,731
  • 5
  • 32
  • 44

2 Answers2

4

Maybe it was not /bin/sh before, try setting it as

/bin/bash
Scary Wombat
  • 44,617
  • 6
  • 35
  • 64
4

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)

samiam
  • 553
  • 3
  • 6