문제

I am build a Digital Ocean VPS for my site but got a weird little problem.

If I ssh root@<ip here> and sign in, I get a terminal prompt of root@<hostname>:~# and things like tab completion etc work nicely.

If I ssh deploy@<ip here>, (deploy is just another user I have made) and sign in, The terminal prompt is just $ and when I try using tab to autocomplete paths it just moves the cursor about 2 tab widths away from where it was and doesn't autofill. Also when I use the up cursor key to view past commands run, I get ^[[A^ outputted.

Any idea what is wrong with my deploy user and thoughts on how it can be fixed? I'm not a hugely competent unix user so i'm a bit stuck. :-/

도움이 되었습니까?

해결책

Answered on IRC, but for the record:

It seems the root user has a bash-like shell assigned which has tab completion enabled, whereas the deploy user has the more stand sh as its shell. This can be confirmed by checking /etc/passwd for the two users.

If that is the case, simply use vipw or usermod -s /path/to/bash deploy to change the deploy user's shell to, in the example, bash (substitute your favorite shell as necessary).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top