系统:Debian-60-squeeze-64-LAMP 2.6.32-5-amd64
以root身份,我在ssh-console中创build一个用户:
useradd -m -G users myuser passwd myuser xxxxxx xxxxxx
苏myuser或通过SSHlogin后我得到:
\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]$ \[\033[00m\] plus the cursor
使用Tab键光标只是向前跳,所以在这里没有完成。
另外箭头键不工作,如果我使用右箭头键我得到:^ [[C
什么可能导致这种行为?
useradd使用/ etc / default / useradd来select给新用户的shell。 adduser使用/etc/adduser.conf,通常是你想要交互式用户而不是系统帐户等。
至less在我的安装中,useraddselect/ bin / sh(链接到/ bin / dash)作为shell,而adduserselectbash。
chsh /bin/bash myuser
将为myuser修复shell,切换到adduser而不是useradd将避免这种types的将来的问题。
或者,如果你真的坚持使用useradd而不是adduser,那么在你的useradd命令中附加'-s / bin / bash'。
从useradd页:
useradd是添加用户的低级实用程序。 在Debian上,pipe理员通常应该使用adduser(8)。
尝试重新创build用户,但使用adduser 。 我已经看到它在不同的场合运行得更好。