Update MacOS.sh

This commit is contained in:
PierreGode 2022-08-09 09:24:09 +02:00 committed by GitHub
parent dfe6995d0e
commit c796c1c020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,12 +6,12 @@ echo "if you already did it then edit this file and uncomment row 6 with a # in
exit exit
# to automate ADjoin check the variables below and find a solution to get from you AD or just type the name of next object in list "next computer object" # to automate ADjoin check the variables below and find a solution to get from you AD or just type the name of next object in list "next computer object"
DOMAIN=$(test.com) ## Domain DOMAIN=$(test.com) ## Domain
admin=$(admin) ## AD admin admin=$(admin) ## AD admin //Note this user can med active directory admin or a user with permission to join domain.
pass=$(password) ## AD admin pass pass=$(password) ## AD admin pass //Note this row is NOT encrypted, coution using this, password might be stored in logs.
adgroup=$(whatevergroup) ## this is to give admin privileges to a group in the active directory ex: MacAdmins adgroup=$(whatevergroup) ## this is to give admin privileges to a group in the active directory ex: MacAdmins
ADcomputer=$(MACagent01 ) ## desired computer object name ( this will only be the name of the computer object in Active Directory, hostname is still the same as default) ADcomputer=$(MACagent01 ) ## desired computer object name ( this will only be the name of the computer object in Active Directory, hostname is still the same as default)
OU=$(OU=Computers Mac,DC=domain,DC=com) ## desired OU were the computer object is created OU=$(OU=Computers Mac,DC=domain,DC=com) ## desired OU were the computer object is created
sudo dsconfigad -add $DOMAIN -mobile enable -mobileconfirm disable -localhome enable -protocol smb -shell '/bin/bash' -username $admin -password $pass -groups $adgroup -computer $ADcomputer -ou $OU sudo dsconfigad -add $DOMAIN -mobile enable -mobileconfirm disable -localhome enable -protocol smb -shell '/bin/bash' -username $admin -password $pass -groups $adgroup -computer $ADcomputer -ou $OU
sudo dsconfig -show sudo dsconfig -show