I am building a script for SA's to follow when performing a certain task. That task requires adding a user to a system that can only SSH to the system (using a key) and not log in with a password. What I want to do is have the SA execute the adduser command with the appropriate flags, all at once, to create the user.
I do not want to do adduser... then usermod -L ,username. (which locks out the user completely), or set the shell to /sbin/nologin (which does the same thing as usermod -L .
I do not want the SA to manually edit /etc/passwd, either.
I am looking for a single commandline solution. I know I can write a script, but that would require the SA to download the script and run it, which is my last resort.