Last active
March 30, 2016 06:07
-
-
Save kartben/b5efcf5214e96542cfccbf0221a78eac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get -y install --no-install-recommends \ | |
openssh-server \ | |
sudo \ | |
procps \ | |
wget \ | |
unzip \ | |
git \ | |
ca-certificates \ | |
maven \ | |
curl && \ | |
sudo mkdir /var/run/sshd && \ | |
sudo sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd && \ | |
sudo echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
CHECK_UID=$(grep 'x:1000:' /etc/passwd) | |
if [ ! "${CHECK_UID}" ]; then | |
sudo useradd -u 1000 -G users,sudo -d /home/user --shell /bin/bash -m user | |
else | |
echo "User with ID 1000 already exists. Skipping user creation" | |
fi | |
# Install latest Node + npm | |
curl -sL https://deb.nodesource.com/setup_4.x | sudo bash - | |
sudo apt-get install -y nodejs build-essential | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment