Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable user accounts #3

Open
jawaad-ahmad opened this issue Dec 28, 2017 · 0 comments
Open

Configurable user accounts #3

jawaad-ahmad opened this issue Dec 28, 2017 · 0 comments

Comments

@jawaad-ahmad
Copy link
Owner

jawaad-ahmad commented Dec 28, 2017

I see the following in stage1/01-sys-tweaks/00-run.sh:

echo "pi:raspberry" | chpasswd
echo "root:root" | chpasswd

Can these be moved out into the config file so that it would be easier to inject values from tools such as Ansible or Puppet?

Keep these commands in mind--useful to add a script for these for easy creation of a new user.

# /usr/sbin/adduser ${newuser}
# /bin/mkdir --mode=700 /home/${newuser}/.ssh
# /bin/chown ${newuser}:${newuser} /home/${newuser}/.ssh
# /usr/bin/touch /home/${newuser}/.ssh/authorized_keys
# /bin/chmod 0600 /home/${newuser}/.ssh/authorized_keys
# /bin/chown ${newuser}:${newuser} /home/${newuser}/.ssh/authorized_keys
# /bin/echo "${newuser} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${newuser}

Update README.md to capture this in the list of differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant