Benjamin_Loison commented on issue Benjamin_Loison/linux#44 2024-11-08 18:58:25 +01:00
Run command on a given user SSH connection
ls /etc/pam.scripts/
ls: cannot access '/etc/pam.scripts/': No such file or directory
sudo mkdir /etc/pam.scripts
/etc/pam.scr…
Benjamin_Loison commented on issue Benjamin_Loison/linux#44 2024-11-08 18:47:37 +01:00
Run command on a given user SSH connection

The purpose is to use matrix-commander.

Benjamin_Loison commented on issue Benjamin_Loison/linux#44 2024-11-08 18:46:30 +01:00
Run command on a given user SSH connection

Being notified when the user logs out would also be interesting but in a second time.

Benjamin_Loison commented on issue Benjamin_Loison/linux#44 2024-11-08 18:44:33 +01:00
Run command on a given user SSH connection

DuckDuckGo search Linux be notified of SSH connection.

Benjamin_Loison commented on issue Benjamin_Loison/linux#44 2024-11-08 18:44:06 +01:00
Run command on a given user SSH connection

Could in theory modify .bashrc but I suspect that the user can avoid running this file, for instance by using SCP. Furthermore, the aim is to not trust the user to not remove this statement from…

Benjamin_Loison commented on issue Benjamin_Loison/linux#44 2024-11-08 18:39:51 +01:00
Run command on a given user SSH connection
ssh root@lemnoslife.com 'date && tail -n 5 /var/log/auth.log'
Output:
Fri Nov  8 06:38:07 PM CET 2024
2024-11-08T18:38:04.547790+01:00…
Benjamin_Loison opened issue Benjamin_Loison/linux#44 2024-11-08 18:35:26 +01:00
Run command on a given user SSH connection
Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 18:19:53 +01:00
Avoid users to see commands executed by others

DuckDuckGo search /etc/fstab syntax.

Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 18:19:30 +01:00
Avoid users to see commands executed by others
/etc/fstab:
proc    /proc    proc    defaults,nosuid,nodev,noexec,hidepid=2     0     0
grep '^proc' /proc/mounts…
Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 18:10:19 +01:00
Avoid users to see commands executed by others
/etc/fstab:
proc    /proc    proc    defaults,hidepid=2     0     0

results at reboot in:

grep '^proc' /proc/mount…
Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 17:57:37 +01:00
Avoid users to see commands executed by others
sudo mkinitramfs
Output:
Usage: mkinitramfs [option]... -o outfile [version]

Options:
  -c compress	Override COMPRESS setting in initramfs.c…
Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 17:55:58 +01:00
Avoid users to see commands executed by others
mkinitramfs
Output:
Command 'mkinitramfs' is available in the following places
 * /sbin/mkinitramfs
 * /usr/sbin/mkinitramfs
The command…
Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 17:54:44 +01:00
Avoid users to see commands executed by others
ls -lh /boot/initrd.img-6.1.0-26-amd64
-rw-r--r-- 1 root root 37M Oct  6 11:33 /boot/initrd.img-6.1.0-26-amd64
file /boot/initrd.img-6.1.0-26-amd64
/…
Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 17:52:54 +01:00
Avoid users to see commands executed by others
ls -l /initrd.img
lrwxrwxrwx 1 root root 30 Oct  6 11:33 /initrd.img -> boot/initrd.img-6.1.0-26-amd64

I don't want a crontab solution as the statement may not be the…

Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 17:36:25 +01:00
Avoid users to see commands executed by others

DuckDuckGo search Debian hidepid on reboot.

Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 15:17:51 +01:00
Avoid users to see commands executed by others
time grep -r 'hidepid' / --exclude-dir={proc,sys}
Output:
grep: /usr/lib/x86_64-linux-gnu/systemd/libsystemd-core-252.so: binary file…
Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 02:02:20 +01:00
Avoid users to see commands executed by others
diff <(mount 
Benjamin_Loison commented on issue Benjamin_Loison/linux#41 2024-11-08 01:56:17 +01:00
Avoid users to see commands executed by others

DuckDuckGo search Debian change mount proc options.