I'm using a Ubuntu server via ssh. Everything is fine under root but if I create and login into the users I create, the navigation keys became ^[[A ^[[B etc. And the original functions such as previous command is gone. I don't know where I go wrong.
It sounds like you are not setting your created user's shell to bash. If you do not set this explicitly, the system uses the default (see /etc/default/useradd). Try adding this option to your useradd command:
I also recommend creating a file in your home directory called .inputrc with the following lines:
This makes the Up button search only for those commands that start with whatever you have typed. So, if you type "sudo" and hit up only those commands starting with sudo will be shown.