Skip to content

Instantly share code, notes, and snippets.

@snallami
Created June 26, 2018 03:07
Show Gist options
  • Save snallami/6139703b6fa870d8dc26cc1ee9cbfdbf to your computer and use it in GitHub Desktop.
Save snallami/6139703b6fa870d8dc26cc1ee9cbfdbf to your computer and use it in GitHub Desktop.
ec2-user permissions in docker file
#!/bin/sh
groupadd --gid 500 ec2-user
useradd --gid 500 --uid 500 ec2-user
mkdir /data && chown ec2-user:ec2-user /data
mkdir /etc/sudoers.d/
echo "ec2-user ALL=(ALL) NOPASSWD: ALL">/etc/sudoers.d/ec2-user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment