Skip to content
Browse files

Create nemsadmin user at prep

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 15, 2019
1 parent fbda1ab commit 69f0b7c51ce8e983da97f4a7f5ded1718b152a5f
Showing with 18 additions and 1 deletion.
  1. +18 −1
@@ -72,6 +72,23 @@ sleep 5
# This requires the user to re-connect
sed -i -e 's/ SendEnv LANG LC_*/# SendEnv LANG LC_*/g' /etc/ssh/ssh_config

echo "System Prepped & Rebooting... re-connect, run screen, then run your build script (see ./notes)."
# Create nemsadmin user
adduser --disabled-password --gecos "" nemsadmin

# Allow user to become super-user
usermod -aG sudo nemsadmin

# Set the user password
echo -e "nemsadmin\nnemsadmin" | passwd nemsadmin >/tmp/init 2>&1

# Add nemsadmin to sudoers and disable root login if that's successful
usermod -aG sudo nemsadmin && passwd -l root

# Add files to nemsadmin home folder (which later get moved to NEMS user account at init)
cd /home/nemsadmin
wget -O license.txt
cp /root/nems/nems-migrator/data/nems/changelog.txt .

echo "System Prepped & Rebooting... re-connect as nemsadmin, run screen, then run your build script (see ./notes)."

0 comments on commit 69f0b7c

Please sign in to comment.
You can’t perform that action at this time.