Most linux distributions, come with /bin/false as a valid and registered shell, for login to the system (but it's a program that returns false and does not open a shell).
I know that useradd and adduser allow a flag for change this at creation time (probably --shell /bin/false).
It could be more safe to be explicit since the creation time, than using chsh (changeshell) to avoid race conditions in security, having a user created with a shell until chsh is run.
You see, I didn't remember the flag, but I did try. That's the kind of answer that maybe some interviews are waiting for.
Failed logins will be logged either way.
I think still could go with the output of `type -P false`. Unless the project requests that feature of messaging to the (forbidden) user, its forbidden logins.
It could work even on embedded devices having only 'false' available.
As far as interviewing a DevOps guy, maybe? I consider myself a decent DevOps person out of necessity, but questions like "How to add a new system user without login permissions?" would kind of annoy me, because that's the exact kind of thing I can't remember because I automated it years ago at my current job. I probably add a new user twice a week... from a Fabric script. I couldn't tell you if it's useradd or adduser because my workflow would be to google the exact wording of the question if I actually needed to do it manually for once.