This file is indexed.

/usr/share/sadms-2.0.15/_list-groups.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
# bbou@ac-toulouse.fr
# 2007-05-22 16:34:37 
# _list-groups.sh

### P A R A M S

MYVERBOSE=
if [ "$1" == "-v" ];then
	export MYVERBOSE="True"
	shift
fi
MYFILTER="$1"
MYNOTFILTER="$2"

### S T A R T

do_it(){
	echo "$1 ($2) $3"
}

echo "--------------------------------------------------------------------------------"
echo "LIST OF GROUPS"
echo "condition : ${MYFILTER}"
echo "not condition : ${MYNOTFILTER}"
echo "id (gid) members"
echo "--------------------------------------------------------------------------------"

if [ "${MYFILTER}" = "" ];then
	MYFILTER="1"
fi
if [ "${MYNOTFILTER}" = "" ];then
	MYNOTFILTER="0"
fi

ids=`getent group | sort | awk 'BEGIN{FS=":"}{if('"${MYFILTER}"' && !'"${MYNOTFILTER}"') printf "%s:%s:%s#",$1,$3,$4}'`
IFS="#"
for i in ${ids}; do
	id=`echo ${i} | sed 's/\([^:]*\):.*$/\1/'`
	gid=`echo ${i} | sed 's/[^:]*:\([^:]*\):.*$/\1/'`
        members=`echo ${i} | sed 's/[^:]*:[^:]*:\([^:]*\)$/\1/'`

	#echo "entry=${i}"
	#echo "id=${id}"
	#echo "gid=${gid}"
	#echo "members=${members}"

	if [ "${gid}" -lt 500 ]; then
		continue
	fi
	if [ "${gid}" -eq 65534 ]; then
		continue
	fi
	
	do_it ${id} ${gid} ${members}
done

if [ ! -z "${MYVERBOSE}" ]; then

echo "--------------------------------------------------------------------------------"
ids=`getent group | sort | awk 'BEGIN{FS=":"}{if('"${MYFILTER}"' && !'"${MYNOTFILTER}"') printf "%s#",$1}'`
IFS="#"
for g in ${ids}; do
	python -c "import grp; print grp.getgrnam(\"${g}\");" #2> /dev/null;
done

echo "--------------------------------------------------------------------------------"
users=`getent passwd | sort | awk 'BEGIN{FS=":"}{printf "%s#",$1}'`
IFS="#"
for u in ${users}; do
	echo -n "${u} is in "; 
	if ! id -Gn ${u} 2> /dev/null; then
		echo "<error>"
	fi
done

fi

IFS="\t\n "