Honestly I think this is a good list of questions to test out a search engine.
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.
I'd still ask the question, your answer - even though you don't know - is good: it indicates that you've probably used useradd and adduser (it's both) and I'm sure if pushed you'd mention what makes a user not be able to log in. You're obviously familiar with the principles so as long as people aren't pedantic you've demonstrated sufficient knowledge.
I don't remember the flag, but this could be my answer:
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.
Cool stuff as in display a message that the account cannot login, which leads to brute-force service, process or other stuff system user names.
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.
I think it's more important you are able to understand and be able to communicate about the questions more than have accurate answers. Being able to hold a technical conversation about a question you don't understand shows that you could solve the queston in a non-interview setting. Everyone knows and expects web access in the field, it's more important that you understand the overall concepts.
So reply with an answer like "I can't remember the specific flags, but I'd look in the man page for them. I automated that years ago and can't recall whether it's adduser or useradd". That kind of answer shows that you still know what the problem domain is without knowing the exact details to answer, and how to find the solution.
One could also be pedantic because a "system" user has special meaning and does not have a login or shell when you create one.. A lot of people however say "system user" to mean "a user on the system" and not necessarily different from a normal user.
Comments
Honestly I think this is a good list of questions to test out a search engine.
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.
I'd still ask the question, your answer - even though you don't know - is good: it indicates that you've probably used useradd and adduser (it's both) and I'm sure if pushed you'd mention what makes a user not be able to log in. You're obviously familiar with the principles so as long as people aren't pedantic you've demonstrated sufficient knowledge.
I don't remember the flag, but this could be my answer:
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.
/sbin/nologin actually does some cool logging stuff that /bin/false doesn't, which is why the distros generally use it.
Cool stuff as in display a message that the account cannot login, which leads to brute-force service, process or other stuff system user names.
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.
I think it's more important you are able to understand and be able to communicate about the questions more than have accurate answers. Being able to hold a technical conversation about a question you don't understand shows that you could solve the queston in a non-interview setting. Everyone knows and expects web access in the field, it's more important that you understand the overall concepts.
So reply with an answer like "I can't remember the specific flags, but I'd look in the man page for them. I automated that years ago and can't recall whether it's adduser or useradd". That kind of answer shows that you still know what the problem domain is without knowing the exact details to answer, and how to find the solution.
One could also be pedantic because a "system" user has special meaning and does not have a login or shell when you create one.. A lot of people however say "system user" to mean "a user on the system" and not necessarily different from a normal user.
it depends on the OS and that's not the important part of the question, as far as I can tell.