I set the login shell to my command line interface program cli.

$ su - admin
$ ps -ef|grep cli
root 32059 32058 0 10:17 pts/1 00:00:00 cli
root 32184 32183 0 10:17 ? 00:00:00 /bin/sh /usr/local/cli/Ldir/C
root 32195 32184 0 10:17 ? 00:00:00 /bin/sh /usr/local/cli/Ldir/C
root 32196 32184 0 10:17 ? 00:00:00 /bin/sh /usr/local/cli/Ldir/C
root 32197 32184 0 10:17 ? 00:00:00 /bin/sh /usr/local/cli/Ldir/C
cli is started properly for user "admin".

$ /usr/sbin/useradd test -p "\$1\$nrKQ3Kh3\$2Hr1BYPHbdM68lXCzPqpj/" -
s /usr/local/cli/cli -u 0 -o -g 0
$ su - test
$ ps -ef|grep cli
root 5178 5177 0 10:28 pts/1 00:00:00 -cli

Why cli is not started properly for user "test"?