useradd -M -s /sbin/nologin -n username
ubuntu 下对应的 shell 应该是 `/bin/false`, CentOS 才是 `/sbin/nologin`
所以应该是
useradd -M -s /bin/false -n username
修正错误
chsh username -s /bin/bash
这里是F_picachoの领域(๑•̀ㅂ•́)و✧Le vent se lève, il faut tenter de vivre.
useradd -M -s /sbin/nologin -n username
ubuntu 下对应的 shell 应该是 `/bin/false`, CentOS 才是 `/sbin/nologin`
所以应该是
useradd -M -s /bin/false -n username
修正错误
chsh username -s /bin/bash