Submit
Path:
~
/
/
lib
/
systemd
/
File Content:
purge-nobody-user
#!/usr/bin/bash -eu if [ $UID -ne 0 ]; then echo "WARNING: This script needs to run as root to be effective" exit 1 fi export SYSTEMD_NSS_BYPASS_SYNTHETIC=1 if [ "${1:-}" = "--ignore-journal" ]; then shift ignore_journal=1 else ignore_journal=0 fi echo "Checking processes..." if ps h -u 99 | grep .; then echo "ERROR: ps reports processes with UID 99!" exit 2 fi echo "... not found" echo "Checking UTMP..." if w -h 199 | grep . ; then echo "ERROR: w reports UID 99 as active!" exit 2 fi if w -h nobody | grep . ; then echo "ERROR: w reports user nobody as active!" exit 2 fi echo "... not found" echo "Checking the journal..." if [ "$ignore_journal" = 0 ] && journalctl -q -b -n10 _UID=99 | grep . ; then echo "ERROR: journalctl reports messages from UID 99 in current boot!" exit 2 fi echo "... not found" echo "Looking for files in /etc, /run, /tmp, and /var..." if find /etc /run /tmp /var -uid 99 -print | grep -m 10 . ; then echo "ERROR: found files belonging to UID 99" exit 2 fi echo "... not found" echo "Checking if nobody is defined correctly..." if getent passwd nobody | grep '^nobody:[x*]:65534:65534:.*:/:/sbin/nologin'; then echo "OK, nothing to do." exit 0 else echo "NOTICE: User nobody is not defined correctly" fi echo "Checking if nfsnobody or something else is using the uid..." if getent passwd 65534 | grep . ; then echo "NOTICE: will have to remove this user" else echo "... not found" fi if [ "${1:-}" = "-x" ]; then if getent passwd nobody >/dev/null; then # this will remove both the user and the group. ( set -x userdel nobody ) fi if getent passwd 65534 >/dev/null; then # Make sure the uid is unused. This should free gid too. name="$(getent passwd 65534 | cut -d: -f1)" ( set -x userdel "$name" ) fi if grep -qE '^(passwd|group):.*\bsss\b' /etc/nsswitch.conf; then echo "Sleeping, so sss can catch up" sleep 3 fi if getent group 65534; then # Make sure the gid is unused, even if uid wasn't. name="$(getent group 65534 | cut -d: -f1)" ( set -x groupdel "$name" ) fi # systemd-sysusers uses the same gid and uid ( set -x systemd-sysusers --inline 'u nobody 65534 "Kernel Overflow User" / /sbin/nologin' ) else echo "Pass '-x' to perform changes" fi
Submit
FILE
FOLDER
Name
Size
Permission
Action
boot
---
0755
catalog
---
0755
network
---
0755
ntp-units.d
---
0755
system
---
0755
system-generators
---
0755
system-preset
---
0755
system-shutdown
---
0755
system-sleep
---
0755
systemd-sysv-install
---
0
systemd-udevd
---
0
user
---
0755
user-environment-generators
---
0755
user-generators
---
0755
user-preset
---
0755
libsystemd-shared.abignore
100 bytes
0644
purge-nobody-user
2355 bytes
0755
resolv.conf
710 bytes
0644
systemd
98224 bytes
0755
systemd-ac-power
15560 bytes
0755
systemd-backlight
36392 bytes
0755
systemd-binfmt
24056 bytes
0755
systemd-bless-boot
32544 bytes
0755
systemd-boot-check-no-failures
15840 bytes
0755
systemd-cgroups-agent
15776 bytes
0755
systemd-coredump
69520 bytes
0755
systemd-cryptsetup
94736 bytes
0755
systemd-export
44768 bytes
0755
systemd-fsck
32240 bytes
0755
systemd-growfs
23992 bytes
0755
systemd-hibernate-resume
15584 bytes
0755
systemd-hostnamed
53328 bytes
0755
systemd-initctl
24072 bytes
0755
systemd-integritysetup
24256 bytes
0755
systemd-journald
185680 bytes
0755
systemd-localed
53104 bytes
0755
systemd-logind
302992 bytes
0755
systemd-makefs
15776 bytes
0755
systemd-measure
53352 bytes
0755
systemd-modules-load
24280 bytes
0755
systemd-network-generator
44888 bytes
0755
systemd-pcrphase
32472 bytes
0755
systemd-pstore
24168 bytes
0755
systemd-quotacheck
15616 bytes
0755
systemd-random-seed
28120 bytes
0755
systemd-remount-fs
19920 bytes
0755
systemd-reply-password
15816 bytes
0755
systemd-rfkill
24088 bytes
0755
systemd-shutdown
52928 bytes
0755
systemd-sleep
32296 bytes
0755
systemd-socket-proxyd
32416 bytes
0755
systemd-sulogin-shell
19984 bytes
0755
systemd-sysctl
28392 bytes
0755
systemd-sysroot-fstab-check
57688 bytes
0755
systemd-sysupdate
127872 bytes
0755
systemd-sysv-install
bytes
0
systemd-timedated
48952 bytes
0755
systemd-udevd
bytes
0
systemd-update-done
15816 bytes
0755
systemd-update-helper
3853 bytes
0755
systemd-update-utmp
24088 bytes
0755
systemd-user-runtime-dir
24032 bytes
0755
systemd-user-sessions
15584 bytes
0755
systemd-vconsole-setup
19952 bytes
0755
systemd-veritysetup
24208 bytes
0755
systemd-volatile-root
24024 bytes
0755
systemd-xdg-autostart-condition
15832 bytes
0755
N4ST4R_ID | Naxtarrr