mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 08:50:12 +01:00
Update ADconnection.sh
This commit is contained in:
parent
d736c91dcd
commit
e4c7e201f4
@ -245,7 +245,7 @@ clear
|
|||||||
usesasl=$( sudo grep USESASL readfile | awk '{print $3}' )
|
usesasl=$( sudo grep USESASL readfile | awk '{print $3}' )
|
||||||
if [ "$usesasl" = "yes" ]
|
if [ "$usesasl" = "yes" ]
|
||||||
then
|
then
|
||||||
sasl=$( cat readfile | grep LDAPS | awk '{print $3}' )
|
sasl=$( sudo grep LDAPS readfile | awk '{print $3}' )
|
||||||
if [ "$sasl" = "null" ]
|
if [ "$sasl" = "null" ]
|
||||||
then
|
then
|
||||||
echo "You need to specify domaincontroller in readfile"
|
echo "You need to specify domaincontroller in readfile"
|
||||||
@ -279,7 +279,7 @@ echo "Found certificate $cacert"
|
|||||||
read -r -p "Is this information correct (y/n)?" yn
|
read -r -p "Is this information correct (y/n)?" yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* )
|
[Yy]* )
|
||||||
tlsca=$( cat /etc/sssd/sssd.conf | grep ldap_tls_cacert | awk '{print $1}' )
|
tlsca=$( sudo grep ldap_tls_cacert /etc/sssd/sssd.conf | awk '{print $1}' )
|
||||||
if [ "$tlsca" = "ldap_tls_cacert" ]
|
if [ "$tlsca" = "ldap_tls_cacert" ]
|
||||||
then
|
then
|
||||||
echo "ldap_tls_cacert already in file"
|
echo "ldap_tls_cacert already in file"
|
||||||
@ -576,17 +576,17 @@ entry_cache_timeout = 600
|
|||||||
entry_cache_nowait_percentage = 75 " | sudo tee -a /etc/sssd/sssd.alternatives
|
entry_cache_nowait_percentage = 75 " | sudo tee -a /etc/sssd/sssd.alternatives
|
||||||
sudo service sssd restart
|
sudo service sssd restart
|
||||||
clear
|
clear
|
||||||
usesasl=$( cat readfile | grep USESASL | awk '{print $3}')
|
usesasl=$( grep USESASL readfile | awk '{print $3}' )
|
||||||
if [ "$usesasl" = "yes" ]
|
if [ "$usesasl" = "yes" ]
|
||||||
then
|
then
|
||||||
sasl=$( cat readfile | grep LDAPS | awk '{print $3}' )
|
sasl=$( grep LDAPS readfile | awk '{print $3}' )
|
||||||
if [ "$sasl" = "null" ]
|
if [ "$sasl" = "null" ]
|
||||||
then
|
then
|
||||||
echo "You need to specify domaincontroller in readfile"
|
echo "You need to specify domaincontroller in readfile"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
echo "$sasl"
|
echo "$sasl"
|
||||||
cacer=$( cat readfile | grep CACERT | awk '{print $3}' )
|
cacer=$( grep CACERT readfile | awk '{print $3}' )
|
||||||
if ! ls $cacer
|
if ! ls $cacer
|
||||||
then echo "No root CA found, check your path to file"
|
then echo "No root CA found, check your path to file"
|
||||||
else
|
else
|
||||||
@ -613,7 +613,7 @@ echo "Found certificate $cacert"
|
|||||||
read -r -p "Is this information correct (y/n)?" yn
|
read -r -p "Is this information correct (y/n)?" yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* )
|
[Yy]* )
|
||||||
tlsca=$( cat /etc/sssd/sssd.conf | grep ldap_tls_cacert | awk '{print $1}' )
|
tlsca=$( grep ldap_tls_cacert /etc/sssd/sssd.conf | awk '{print $1}' )
|
||||||
if [ "$tlsca" = "ldap_tls_cacert" ]
|
if [ "$tlsca" = "ldap_tls_cacert" ]
|
||||||
then
|
then
|
||||||
echo "ldap_tls_cacert already in file"
|
echo "ldap_tls_cacert already in file"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user