24 lines
771 B
Text
24 lines
771 B
Text
|
# Setup Service Account
|
||
|
clear
|
||
|
echo ===========================================
|
||
|
echo = Server Node Installation as Docker Host =
|
||
|
echo ===========================================
|
||
|
echo = Patching Sudo with Ruby Group Patch...
|
||
|
groupadd --gid 50000 ruby
|
||
|
echo "%ruby ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ruby-root
|
||
|
echo = Service Account Creation...
|
||
|
echo -n "= Username (lowercase): "
|
||
|
read Suid
|
||
|
echo = Creating $Suid...
|
||
|
useradd -d /home/service-$Suid -m $Suid
|
||
|
echo = Defining Shell to FiSH...
|
||
|
usermod --shell /usr/bin/fish $Suid
|
||
|
usermod --shell /usr/bin/fish root
|
||
|
echo = Adding to Groups Wheel, Ruby and Docker...
|
||
|
usermod -aG wheel $Suid
|
||
|
usermod -aG ruby $Suid
|
||
|
usermod -aG docker $Suid
|
||
|
echo = Set Password for $Suid Account...
|
||
|
passwd $Suid
|
||
|
echo = Setup $Suid Quick Sudo...
|