1, execute the following command to create a new user
useradd -d /home/sam -m sam -s /bin/sh -g group -G adm,root
This command specifies the user's login shell is / bin / sh
This is why the problems described in the title
2, need to be performed under root privileges:
vim /etc/passwd
The sam figure above the line of '/ bin / sh' modified '/ bin / bash'
Then save enough!