Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

provide a variable/configuration option/something else for useradd command-line parameters #39

Closed
uberbrady opened this issue Apr 25, 2017 · 1 comment
Labels
Milestone

Comments

@uberbrady
Copy link
Contributor

For a particular implementation of aws-ec2-ssh, I wanted to override the defaults set in /etc/defaults/useradd. I still wanted "regular" invocations of useradd to respect them, mind you, but for users added via this solution, I wanted those users to specifically live somewhere else.

Furthermore, I noticed that the shell when the users are added from this script is hard-coded to /bin/bash. I figure, we ought to default to whatever the default shell is, but perhaps allow a config variable so that we can set a different default for people added via this script?

I'm thinking some kind of config variable called USERADD_OPTIONS, and you can add things like -b /my/custom/basedir (for my particular problem when I was using a funny homedir), or maybe --shell /bin/tcsh (for those who might want a non-default shell for their aws-ec2-ssh-controlled users).

(If you wanted both, I would think you'd want something like USERADD_OPTIONS="-b /my/custom/basedir --shell /usr/bin/zsh")

@mvanbaak
Copy link
Contributor

I like the idea. This would also make it possible to use this script on FreeBSD/OpenBSD for example...

@michaelwittig michaelwittig modified the milestones: v1.x, v1.1 Apr 30, 2017
michaelwittig pushed a commit that referenced this issue May 3, 2017
* Make both the useradd program and the arguments for useradd configurable. Closes #39

* fix documentation
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants