mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 08:50:12 +01:00
Fixed checks
This commit is contained in:
parent
7392675d95
commit
c24b41b003
@ -1318,7 +1318,7 @@ fi
|
|||||||
Reauthenticate(){
|
Reauthenticate(){
|
||||||
export HOSTNAME
|
export HOSTNAME
|
||||||
myhost=$( hostname | cut -d '.' -f1 )
|
myhost=$( hostname | cut -d '.' -f1 )
|
||||||
whoelse=$( who -ut | grep -v old | awk '{print $1}' )
|
whoelse=$( who -ut | grep -v old | awk '{print $1}' | head -1 )
|
||||||
homeshome=$( sudo realm list | grep domain-name | awk '{print $2}' )
|
homeshome=$( sudo realm list | grep domain-name | awk '{print $2}' )
|
||||||
homes=$( find /home/"$homeshome" -maxdepth 1 -mindepth 1 | head -1 | cut -d '/' -f4 )
|
homes=$( find /home/"$homeshome" -maxdepth 1 -mindepth 1 | head -1 | cut -d '/' -f4 )
|
||||||
if [ "$homes" = "$whoelse" ]
|
if [ "$homes" = "$whoelse" ]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user