Pergunta

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. :-/

Foi útil?

Solução

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).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top