From 62078ec64a021ec5fbbd8bb80a17df2f5d61bcb4 Mon Sep 17 00:00:00 2001 From: PierreGoude Date: Thu, 15 Jun 2017 08:39:25 +0200 Subject: [PATCH] Create ADconnection.sh --- ADconnection.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ADconnection.sh b/ADconnection.sh index 6da3848..26c1211 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -132,7 +132,15 @@ echo "Files seems already to be modified, skipping..." else echo "NOTICE! /etc/ssh/login.group.allowed will be created. make sure yor local user is in it you you could be banned from login" sudo touch /etc/ssh/login.group.allowed -sudo echo "administrator" | sudo tee -a /etc/ssh/login.group.allowed +admins=$( cat /etc/passwd | grep home | grep bash | cut -d ':' -f1 ) +echo "Is your current administrator = "$admins" ?" + case $yn in + [Yy]* ) sudo echo "$admins" | sudo tee -a /etc/ssh/login.group.allowed;; + [Nn]* ) echo "please type name of current administrator" +read -p MYADMIN +sudo echo "$MYADMIN" | sudo tee -a /etc/ssh/login.group.allowed;; + * ) echo "Please answer yes or no.";; + esac sudo echo "$NetBios"'\'"$myhost""sudoers" | sudo tee -a /etc/ssh/login.group.allowed sudo echo "$NetBios"'\'"domain^admins" | sudo tee -a /etc/ssh/login.group.allowed sudo echo "root" | sudo tee -a /etc/ssh/login.group.allowed