This file is indexed.

/usr/share/sadms-2.0.15/conf/leave-domain.sh is in sadms 2.0.15.repack-0ubuntu2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# bbou@ac-toulouse.fr
# 2007-06-07 
# conf/leave-domain.sh 

### P A R A M S

MYVERBOSE=
redirection='> /dev/null'
if [ "$1" = "-v" ]; then
	MYVERBOSE="True"
	redirection=
	shift
fi
MYADMIN="$1"
MYADMINPWD="$2"

### I N C L U D E S
. ./_include.sh

### S T A R T

function indomain()
{
	echo "+test domain membership"
	e="net ads testjoin > /dev/null 2>&1"
	if eval ${e}; then
		echo "in domain"
		return 0
	else
		echo "not in domain"
		return 1
	fi
}

# L E A V E   D O M A I N
if indomain; then
	echo "+leave domain"
	e="net ads leave -U '${MYADMIN}%${MYADMINPWD}' ${redirection}"
	#echo ${e}
	eval ${e}
	echo "left domain"
fi

# T E S T
#if indomain; then
#	exit 1
#else
	exit 0
#fi