User Tools

Site Tools


computing:miscadmin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:miscadmin [2021/05/30 20:36] oemb1905computing:miscadmin [2024/05/17 02:19] (current) oemb1905
Line 1: Line 1:
- 
 ------------------------------------------- -------------------------------------------
   * **miscadmin**    * **miscadmin** 
Line 244: Line 243:
   sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target   sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
      
--+-xorg with ssh
  
- --- //[[jonathan@haacksnetworking.com|oemb1905]] 2021/05/30 14:35//+  touch /root/.Xauthority  
 +  touch /home/user/.Xauthority 
 +   
 +-batch convert with ffmpeg to mp4 from mkv 
 + 
 +  for i in *.mkv; do 
 +  ffmpeg -i "$i" -codec copy "${i%.*}.mp4" 
 +  done 
 + 
 +-fix badly configured zpool that used short names to by-id names. This command can be entered as-is, and does not need to be adjusted at all for what your specific ids are or for multiple drives. It literally exports the short names and by-ids, unmounts the volumes/pool, then remakes it using the blkid. 
 + 
 +  zpool export tank  
 +  zpool import -d /dev/disk/by-id tank 
 +   
 +monitor ram usage every 3 seconds in human readable way 
 + 
 +  free -h -w -s 3 
 +   
 +postfix to relay, satellite option, enter the relay like this:  to prevent lookups 
 +   
 +  [smtp.smtpserver.com]:587 
 +   
 +Re-attach to screen session that's attached. 
 + 
 +  screen -d -r <session#.user> 
 +   
 +mysqldump to local from remote 
 + 
 +  ssh root@hub.haacksnetworking.org /usr/bin/mysqldump --all-databases --single-transaction --skip-comments --skip-dump-date > hknet.sqldump 
 +   
 +Turn off sleep. 
 + 
 +  sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target 
 +   
 +Amd gPU errors fix 
 +   
 +  mkdir ~/Repositories 
 +  cd /home/user/Repositories && git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/firmware/linux-firmware.git 
 +  sudo cp /home/user/Repositories/linux-firmware/amdgpu/* /lib/firmware/amdgpu && sudo update-initramfs -k all -u -v 
 +   
 +Unattended Upgrades 
 + 
 +  sudo apt install unattended-upgrades 
 +  sudo apt install apt-config-auto-update 
 +  sudo unattended-upgrades --dry-run --debug 
 +  sudo systemctl status unattended-upgrades 
 + 
 +Next ... ssh failed attempts 
 + 
 +  grep "Failed password" /var/log/auth.log 
 +  journalctl _SYSTEMD_UNIT=ssh.service | egrep "Failed|Failure" 
 +  faillock --user <user> 
 +  grep "authentication failure" /var/log/auth.log | awk '{ print $14 }' | cut -b7-  | sort | uniq -c 
 + 
 +Display Managers (Lightdm, etc.) 
 + 
 +  sudo nano /etc/lightdm/lightdm-gtk-greeter.conf 
 +  [SeatDefaults] 
 +  allow-guest=false 
 +  greeter-hide-users=true 
 +  nano ~/.config/gtk-3.0/settings.ini 
 +  [Settings] 
 +  gtk-application-prefer-dark-theme=1 
 +  sudo nano /etc/lightdm/lightdm.conf 
 +  cd /usr/share/lightdm/light.conf.d/ 
 +   
 +Setting ufw to allow connections to only certain subnets. 
 + 
 +  ufw allow from 10.16.16.0/24 to any proto tcp port 8006 
 +  ufw allow from 10.36.36.0/24 to any proto tcp port 8006 
 +  ufw allow from 10.16.16.0/24 to any proto tcp port 22 
 +  ufw allow from 10.36.36.0/24 to any proto tcp port 22 
 +  ufw allow from 10.16.16.0/24 to any proto tcp port 80 
 +  ufw allow from 10.36.36.0/24 to any proto tcp port 80 
 +  ufw allow from 10.16.16.0/24 to any proto tcp port 443 
 +  ufw allow from 10.36.36.0/24 to any proto tcp port 443 
 + 
 +Establish NIC name using mac:ID 
 + 
 +  nano /etc/udev/rules.d/70-persistent-net.rules 
 +  SUBSYSTEM=="net",ACTION=="add",ATTR{address}=="00:00:00:00:00:00",ATTR{type}=="1",NAME="eth100" 
 +   
 +Establish Nemo as default, remove desktop icons, verify nemo default 
 + 
 +  xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search 
 +  gsettings set org.gnome.desktop.background show-desktop-icons false 
 +  xdg-mime query default inode/directory 
 +   
 +Sury php 
 + 
 +  sudo apt install -y apt-transport-https lsb-release ca-certificates wget 
 +  wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg 
 +  echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list  
 +   
 +Static ipv6 in ifupdown 
 + 
 +  iface enp0s3 inet6 static 
 +    address 2001:db8:1000::
 +    netmask 64 
 +    gateway 2001:db8:1000::
 +    autoconf 0 
 +    dns-nameservers 2001:4860:4860::8888 2001:4860:4860::8844 
 +   
 + --- //[[webmaster@haacksnetworking.org|oemb1905]] 2024/05/17 01:24//
computing/miscadmin.1622406994.txt.gz · Last modified: 2021/05/30 20:36 by oemb1905