System/Kernel


janitor@dc-9:~$ uname -a ; cat /etc/*release
Linux dc-9 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
  • 4.19.0-6-amd64
  • x86_64
  • Debian GNU/Linux 10 (buster)

Networks


janitor@dc-9:~$ ip route ; arp -a
default via 192.168.207.254 dev eth0 onlink 
192.168.207.0/24 dev eth0 proto kernel scope link src 192.168.207.209 
bash: arp: command not found
janitor@dc-9:~$ ss -tunlp
Netid          State           Recv-Q          Send-Q                   Local Address:Port                   Peer Address:Port          
tcp            LISTEN          0               80                           127.0.0.1:3306                        0.0.0.0:*             
tcp            LISTEN          0               128                            0.0.0.0:22                          0.0.0.0:*             
tcp            LISTEN          0               128                                  *:80                                *:*             
tcp            LISTEN          0               128                               [::]:22                             [::]:*             

127.0.0.1:3306

Users & Groups


janitor@dc-9:~$ cat /etc/passwd ; ll /home
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
systemd-timesync:x:101:102:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin
systemd-network:x:102:103:systemd Network Management,,,:/run/systemd:/usr/sbin/nologin
systemd-resolve:x:103:104:systemd Resolver,,,:/run/systemd:/usr/sbin/nologin
messagebus:x:104:110::/nonexistent:/usr/sbin/nologin
sshd:x:105:65534::/run/sshd:/usr/sbin/nologin
systemd-coredump:x:999:999:systemd Core Dumper:/:/usr/sbin/nologin
mysql:x:106:113:MySQL Server,,,:/nonexistent:/bin/false
marym:x:1001:1001:Mary Moe:/home/marym:/bin/bash
julied:x:1002:1002:Julie Dooley:/home/julied:/bin/bash
fredf:x:1003:1003:Fred Flintstone:/home/fredf:/bin/bash
barneyr:x:1004:1004:Barney Rubble:/home/barneyr:/bin/bash
tomc:x:1005:1005:Tom Cat:/home/tomc:/bin/bash
jerrym:x:1006:1006:Jerry Mouse:/home/jerrym:/bin/bash
wilmaf:x:1007:1007:Wilma Flintstone:/home/wilmaf:/bin/bash
bettyr:x:1008:1008:Betty Rubble:/home/bettyr:/bin/bash
chandlerb:x:1009:1009:Chandler Bing:/home/chandlerb:/bin/bash
joeyt:x:1010:1010:Joey Tribbiani:/home/joeyt:/bin/bash
rachelg:x:1011:1011:Rachel Green:/home/rachelg:/bin/bash
rossg:x:1012:1012:Ross Geller:/home/rossg:/bin/bash
monicag:x:1013:1013:Monica Geller:/home/monicag:/bin/bash
phoebeb:x:1014:1014:Phoebe Buffay:/home/phoebeb:/bin/bash
scoots:x:1015:1015:Scooter McScoots:/home/scoots:/bin/bash
janitor:x:1016:1016:Donald Trump:/home/janitor:/bin/bash
janitor2:x:1017:1017:Scott Morrison:/home/janitor2:/bin/bash
total 76K
4.0K drwx------  3 chandlerb chandlerb 4.0K Jul  3 08:49 chandlerb
4.0K drwx------  4 janitor   janitor   4.0K Jul  3 08:49 janitor
4.0K drwx------  3 joeyt     joeyt     4.0K Jul  3 08:49 joeyt
4.0K drwx------  2 fredf     fredf     4.0K Jun 17  2022 fredf
4.0K drwxr-xr-x 18 root      root      4.0K Jun 15  2022 ..
4.0K drwx------  2 wilmaf    wilmaf    4.0K Dec 29  2019 wilmaf
4.0K drwx------  2 tomc      tomc      4.0K Dec 29  2019 tomc
4.0K drwx------  2 scoots    scoots    4.0K Dec 29  2019 scoots
4.0K drwx------  2 rossg     rossg     4.0K Dec 29  2019 rossg
4.0K drwx------  2 rachelg   rachelg   4.0K Dec 29  2019 rachelg
4.0K drwx------  2 phoebeb   phoebeb   4.0K Dec 29  2019 phoebeb
4.0K drwx------  2 monicag   monicag   4.0K Dec 29  2019 monicag
4.0K drwx------  2 marym     marym     4.0K Dec 29  2019 marym
4.0K drwx------  2 julied    julied    4.0K Dec 29  2019 julied
4.0K drwx------  2 jerrym    jerrym    4.0K Dec 29  2019 jerrym
4.0K drwx------  2 janitor2  janitor2  4.0K Dec 29  2019 janitor2
4.0K drwx------  2 bettyr    bettyr    4.0K Dec 29  2019 bettyr
4.0K drwx------  2 barneyr   barneyr   4.0K Dec 29  2019 barneyr
4.0K drwxr-xr-x 19 root      root      4.0K Dec 29  2019 .
janitor@dc-9:~$ cut -d: -f1 /etc/passwd | xargs -n1 id
uid=0(root) gid=0(root) groups=0(root)
uid=1(daemon) gid=1(daemon) groups=1(daemon)
uid=2(bin) gid=2(bin) groups=2(bin)
uid=3(sys) gid=3(sys) groups=3(sys)
uid=4(sync) gid=65534(nogroup) groups=65534(nogroup)
uid=5(games) gid=60(games) groups=60(games)
uid=6(man) gid=12(man) groups=12(man)
uid=7(lp) gid=7(lp) groups=7(lp)
uid=8(mail) gid=8(mail) groups=8(mail)
uid=9(news) gid=9(news) groups=9(news)
uid=10(uucp) gid=10(uucp) groups=10(uucp)
uid=13(proxy) gid=13(proxy) groups=13(proxy)
uid=33(www-data) gid=33(www-data) groups=33(www-data)
uid=34(backup) gid=34(backup) groups=34(backup)
uid=38(list) gid=38(list) groups=38(list)
uid=39(irc) gid=39(irc) groups=39(irc)
uid=41(gnats) gid=41(gnats) groups=41(gnats)
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
uid=100(_apt) gid=65534(nogroup) groups=65534(nogroup)
uid=101(systemd-timesync) gid=102(systemd-timesync) groups=102(systemd-timesync)
uid=102(systemd-network) gid=103(systemd-network) groups=103(systemd-network)
uid=103(systemd-resolve) gid=104(systemd-resolve) groups=104(systemd-resolve)
uid=104(messagebus) gid=110(messagebus) groups=110(messagebus)
uid=105(sshd) gid=65534(nogroup) groups=65534(nogroup)
uid=999(systemd-coredump) gid=999(systemd-coredump) groups=999(systemd-coredump)
uid=106(mysql) gid=113(mysql) groups=113(mysql)
uid=1001(marym) gid=1001(marym) groups=1001(marym)
uid=1002(julied) gid=1002(julied) groups=1002(julied)
uid=1003(fredf) gid=1003(fredf) groups=1003(fredf)
uid=1004(barneyr) gid=1004(barneyr) groups=1004(barneyr)
uid=1005(tomc) gid=1005(tomc) groups=1005(tomc)
uid=1006(jerrym) gid=1006(jerrym) groups=1006(jerrym)
uid=1007(wilmaf) gid=1007(wilmaf) groups=1007(wilmaf)
uid=1008(bettyr) gid=1008(bettyr) groups=1008(bettyr)
uid=1009(chandlerb) gid=1009(chandlerb) groups=1009(chandlerb)
uid=1010(joeyt) gid=1010(joeyt) groups=1010(joeyt)
uid=1011(rachelg) gid=1011(rachelg) groups=1011(rachelg)
uid=1012(rossg) gid=1012(rossg) groups=1012(rossg)
uid=1013(monicag) gid=1013(monicag) groups=1013(monicag)
uid=1014(phoebeb) gid=1014(phoebeb) groups=1014(phoebeb)
uid=1015(scoots) gid=1015(scoots) groups=1015(scoots)
uid=1016(janitor) gid=1016(janitor) groups=1016(janitor)
uid=1017(janitor2) gid=1017(janitor2) groups=1017(janitor2)

SUIDs


janitor@dc-9:~$ find / -perm -04000 -ls -type f 2>/dev/null | grep -v '/snap'
    15862    428 -rwsr-xr-x   1 root     root       436552 Oct  7  2019 /usr/lib/openssh/ssh-keysign
   137189     12 -rwsr-xr-x   1 root     root        10232 Mar 28  2017 /usr/lib/eject/dmcrypt-get-device
    12495     52 -rwsr-xr--   1 root     messagebus    51184 Jun 10  2019 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
       60     44 -rwsr-xr-x   1 root     root          44528 Jul 27  2018 /usr/bin/chsh
     3890     36 -rwsr-xr-x   1 root     root          34888 Jan 10  2019 /usr/bin/umount
       63     64 -rwsr-xr-x   1 root     root          63736 Jul 27  2018 /usr/bin/passwd
       62     84 -rwsr-xr-x   1 root     root          84016 Jul 27  2018 /usr/bin/gpasswd
    18413    156 -rwsr-xr-x   1 root     root         157192 Oct 12  2019 /usr/bin/sudo
     3415     44 -rwsr-xr-x   1 root     root          44440 Jul 27  2018 /usr/bin/newgrp
       59     56 -rwsr-xr-x   1 root     root          54096 Jul 27  2018 /usr/bin/chfn
     3562     64 -rwsr-xr-x   1 root     root          63568 Jan 10  2019 /usr/bin/su
     3888     52 -rwsr-xr-x   1 root     root          51280 Jan 10  2019 /usr/bin/mount

SGIDs


janitor@dc-9:~$ find / -type f -perm -02000 -ls 2>/dev/null | grep -v '/snap'
      815     40 -rwxr-sr-x   1 root     shadow      39616 Feb 14  2019 /usr/sbin/unix_chkpwd
     1706     36 -rwxr-sr-x   1 root     tty         34896 Jan 10  2019 /usr/bin/wall
    12688     20 -rwxr-sr-x   1 root     mail        18944 Dec  4  2017 /usr/bin/dotlockfile
    15855    316 -rwxr-sr-x   1 root     ssh        321672 Oct  7  2019 /usr/bin/ssh-agent
       61     32 -rwxr-sr-x   1 root     shadow      31000 Jul 27  2018 /usr/bin/expiry
     5442     16 -rwxr-sr-x   1 root     tty         14736 May  4  2018 /usr/bin/bsd-write
     5515     44 -rwxr-sr-x   1 root     crontab     43568 Jun 24  2019 /usr/bin/crontab
       58     72 -rwxr-sr-x   1 root     shadow      71816 Jul 27  2018 /usr/bin/chage

Capabilities


janitor@dc-9:~$ getcap -r / 2>/dev/null

Processes


janitor@dc-9:~$ ps -auxwww
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  1.0 103900 10264 ?        Ss   05:31   0:00 /sbin/init
root       259  0.0  0.8  40536  8816 ?        Ss   05:31   0:00 /lib/systemd/systemd-journald
root       276  0.0  0.5  22188  5124 ?        Ss   05:31   0:00 /lib/systemd/systemd-udevd
systemd+   435  0.0  0.6  93080  6512 ?        Ssl  05:31   0:00 /lib/systemd/systemd-timesyncd
root       440  0.0  0.7  19516  7272 ?        Ss   05:31   0:00 /lib/systemd/systemd-logind
message+   442  0.0  0.4   9144  4380 ?        Ss   05:31   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root       444  0.0  0.4 225824  4420 ?        Ssl  05:31   0:00 /usr/sbin/rsyslogd -n -iNONE
root       446  0.0  0.2   8504  2864 ?        Ss   05:31   0:00 /usr/sbin/cron -f
root       463  0.0  0.1   5612  1748 tty1     Ss+  05:31   0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root       473  0.0  0.6  15852  6944 ?        Ss   05:31   0:00 /usr/sbin/sshd -D
root       538  0.0  0.8 135112  8872 ?        Sl   05:31   0:04 /usr/bin/vmtoolsd
mysql      556  0.0  9.2 1254632 93680 ?       Ssl  05:31   0:03 /usr/sbin/mysqld
root       565  0.0  2.5 201628 25592 ?        Ss   05:31   0:00 /usr/sbin/apache2 -k start
root      1163  0.0  0.4   6680  4116 ?        Ss   05:34   0:00 /usr/sbin/knockd -i eth0
www-data  2089  0.0  1.1 201936 11396 ?        S    08:46   0:00 /usr/sbin/apache2 -k start
root      2756  0.0  0.8  16924  8304 ?        Ss   08:52   0:00 sshd: chandlerb [priv]
chandle+  2759  0.0  0.8  21020  8420 ?        Ss   08:52   0:00 /lib/systemd/systemd --user
chandle+  2760  0.0  0.2 105148  2400 ?        S    08:52   0:00 (sd-pam)
chandle+  2773  0.0  0.4  16924  5000 ?        S    08:52   0:00 sshd: chandlerb@pts/0
chandle+  2774  0.0  0.4   7652  4520 pts/0    Ss   08:52   0:00 -bash
root      2781  0.0  0.3   9748  3408 pts/0    S    08:53   0:00 su janitor
janitor   2782  0.0  0.3   6992  3756 pts/0    S    08:53   0:00 bash
janitor   2860  0.0  0.3  10916  3272 pts/0    R+   08:55   0:00 ps -auxwww
  • root 446 0.0 0.2 8504 2864 ? Ss 05:31 0:00 /usr/sbin/cron -f
  • root 1163 0.0 0.4 6680 4116 ? Ss 05:34 0:00 /usr/sbin/knockd -i eth0

Cron & Systemd


janitor@dc-9:~$ crontab -l ; cat /etc/crontab ; systemctl list-timers
no crontab for janitor
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
 
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed
17 *	* * *	root    cd / && run-parts --report /etc/cron.hourly
25 6	* * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
NEXT                          LEFT       LAST                          PASSED       UNIT                         ACTIVATES
Thu 2025-07-03 09:09:00 AEST  12min left Thu 2025-07-03 08:39:01 AEST  17min ago    phpsessionclean.timer        phpsessionclean.service
Thu 2025-07-03 19:45:11 AEST  10h left   Thu 2025-07-03 06:19:34 AEST  2h 36min ago apt-daily.timer              apt-daily.service
Fri 2025-07-04 00:00:00 AEST  15h left   Thu 2025-07-03 05:33:52 AEST  3h 22min ago logrotate.timer              logrotate.service
Fri 2025-07-04 00:00:00 AEST  15h left   Thu 2025-07-03 05:33:52 AEST  3h 22min ago man-db.timer                 man-db.service
Fri 2025-07-04 05:46:37 AEST  20h left   Thu 2025-07-03 05:46:37 AEST  3h 9min ago  systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.
Fri 2025-07-04 06:54:13 AEST  21h left   Thu 2025-07-03 06:36:10 AEST  2h 20min ago apt-daily-upgrade.timer      apt-daily-upgrade.servi
 
6 timers listed.
Pass --all to see loaded but inactive timers, too.

Services


janitor@dc-9:~$ systemctl list-units --state=running
UNIT                              LOAD   ACTIVE SUB     DESCRIPTION                                                  
proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Formats File System Automount Point
init.scope                        loaded active running System and Service Manager                                   
session-22.scope                  loaded active running Session 22 of user chandlerb                                 
apache2.service                   loaded active running The Apache HTTP Server                                       
cron.service                      loaded active running Regular background program processing daemon                 
dbus.service                      loaded active running D-Bus System Message Bus                                     
getty@tty1.service                loaded active running Getty on tty1                                                
knockd.service                    loaded active running Port-Knock Daemon                                            
mariadb.service                   loaded active running MariaDB 10.3.17 database server                              
open-vm-tools.service             loaded active running LSB: Runs the open-vm-tools services                         
rsyslog.service                   loaded active running System Logging Service                                       
ssh.service                       loaded active running OpenBSD Secure Shell server                                  
systemd-journald.service          loaded active running Journal Service                                              
systemd-logind.service            loaded active running Login Service                                                
systemd-timesyncd.service         loaded active running Network Time Synchronization                                 
systemd-udevd.service             loaded active running udev Kernel Device Manager                                   
user@1009.service                 loaded active running User Manager for UID 1009                                    
dbus.socket                       loaded active running D-Bus System Message Bus Socket                              
syslog.socket                     loaded active running Syslog Socket                                                
systemd-journald-audit.socket     loaded active running Journal Audit Socket                                         
systemd-journald-dev-log.socket   loaded active running Journal Socket (/dev/log)                                    
systemd-journald.socket           loaded active running Journal Socket                                               
systemd-udevd-control.socket      loaded active running udev Control Socket                                          
systemd-udevd-kernel.socket       loaded active running udev Kernel Socket                                           
 
LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
 
24 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
  • apache2.service
  • cron.service
  • knockd.service
  • mariadb.service

Sudo Version


janitor@dc-9:~$ sudo --version
Sudo version 1.8.27
Sudoers policy plugin version 1.8.27
Sudoers file grammar version 46
Sudoers I/O plugin version 1.8.27

Sudo version 1.8.27

Glibc Version


janitor@dc-9:~$ ldd --version
ldd (Debian GLIBC 2.28-10) 2.28
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

ldd (Debian GLIBC 2.28-10) 2.28