سؤال

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?

هل كانت مفيدة؟

المحلول

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)

نصائح أخرى

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

/bin/bash
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top