Hello,

I'd like to work on this bug as my first Debian contribution. Before writing 
any code I'd like to confirm the intended design, since adduser is a core 
package and I'd rather not guess.

My understanding of the request:

$ adduser --ssh-id FILE newuser

would imply --disabled-password and install FILE as 
~newuser/.ssh/authorized_keys (0600), inside a 0700 ~/.ssh owned by the new 
user.

Open questions:

1. Option name: --ssh-id as originally requested, or something more explicit 
like --add-ssh-key / --authorized-keys?
2. Argument: a path to a file only, or should "-" mean stdin, or should a 
literal key string also be accepted?
3. What should happen when the option is combined with --no-create-home, with a 
home directory of /nonexistent, or with an already existing home directory? My 
inclination is to fail early with a clear error rather than silently skip the 
key.
4. Should the key be validated (e.g. basic syntax check on the key type field), 
given that adduser must not depend on openssh-client?
5. Should this be exposed in adduser.conf as well, or command line only?
6. Does it make sense for --system users?

Happy to follow whatever direction you prefer, and to write the manpage, the 
test cases and the changelog entry along with the patch.

Thanks,
Juan Muñoz

Reply via email to