This file is indexed.

/usr/share/sadms-2.0.15/_list-users.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
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
# bbou@ac-toulouse.fr
# 2007-05-22 16:34:08 
# _list-users.sh

### P A R A M S

MYVERBOSE=
if [ "$1" == "-v" ];then
	export MYVERBOSE="True"
	shift
fi
MYFILTER="$1"
MYNOTFILTER="$2"
#echo "filter=${MYFILTER}"
#echo "notfilter=${MYFILTER}"

### S T A R T

do_it(){
	# 1=id 2=uid 3=gid 4=home
	echo "$1 ($2)($3) $4"
}

echo "--------------------------------------------------------------------------------"
echo "LIST OF USERS"
echo "condition : ${MYFILTER}"
echo "not condition : ${MYNOTFILTER}"
echo "id (uid)(gid) home"
echo "--------------------------------------------------------------------------------"

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

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

	#echo "${id}"
	#echo "${uid}"
	#echo "${gid}"
	#echo "${home}"

	if [ -z "${uid}" ]; then
		continue
	fi
	if [ -z "${gid}" ]; then
		continue
	fi
	if [ "${uid}" -lt 500 ]; then
		continue
	fi
	if [ "${uid}" -eq 65534 ]; then
		continue
	fi
	#if [ ! ${home} = "/home/${id}" ]; then
	#	continue
	#fi
	
	do_it ${id} ${uid} ${gid} ${home}
done

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

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

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

fi

IFS="\t\n "