The problem of creating a new user by adduser under ubuntu was encountered yesterday. I used the user's ub and created a new user by using useradd, however, when switching to this user, the terminal does not display as usual [user @ hostname ~] Only one $ character is displayed, and directories and scripts are not identified by special colors. I checked the information to solve the problem. First, check the configuration file/etc/passwd to see if your new user is using bash. If not, change it.
Www.2cto.com and check whether there is any hidden file in the user's home directory. bashrc and. profile files (which can be displayed by ls-A in ub). If not, copy the files in/etc/skel. Remember to modify the permissions and owner of the files. Run the following two Commands: (I explained from the perspective of the new user identity) echo '[\ u @ \ h \ W] \ $'> ~ /. Bashrcsource ~ /. After bashrc is restarted, it will be OK. In addition, the newly created user may not be able to use sudo, prompting you that the user is not in The sudo list. This problem is well solved. Execute mongodo, find root ALL = (ALL) ALL, add a row below, and set the root in the previous sentence to your username, save and exit.