224 lines
7.3 KiB
Markdown
224 lines
7.3 KiB
Markdown
---
|
|
created: 2024-01-29T00:24:50.067Z
|
|
type: topic
|
|
updated: 2024-11-02T15:37:15.000Z
|
|
---
|
|
|
|
# Asus Laptop
|
|
|
|
```bash
|
|
ufw allow from 192.168.11.0/28 to any port 22 comment "01) SSH"
|
|
ufw allow from 192.168.11.0/28 to any port 80 comment "02) HTTP"
|
|
ufw allow from 192.168.11.0/28 to any port 9400 comment "03) dashkiosk"
|
|
ufw allow from 192.168.0.0/24 to any port 22 comment "04) SSH"
|
|
ufw allow from 192.168.0.0/24 to any port 80 comment "05) HTTP"
|
|
ufw allow from 192.168.0.0/24 to any port 9400 comment "06) dashkiosk"
|
|
```
|
|
|
|
```bash
|
|
38.8 GiB [##########] /var
|
|
4.0 GiB [# ] swap.img
|
|
3.0 GiB [ ] /usr
|
|
2.8 GiB [ ] /snap
|
|
258.7 MiB [ ] /boot
|
|
5.9 MiB [ ] /etc
|
|
2.0 MiB [ ] /root
|
|
1.5 MiB [ ] /run
|
|
140.0 KiB [ ] /tmp
|
|
92.0 KiB [ ] /home
|
|
e 16.0 KiB [ ] /lost+found
|
|
e 4.0 KiB [ ] /srv
|
|
e 4.0 KiB [ ] /opt
|
|
e 4.0 KiB [ ] /mnt
|
|
e 4.0 KiB [ ] /media
|
|
. 0.0 B [ ] /proc
|
|
0.0 B [ ] /sys
|
|
0.0 B [ ] /dev
|
|
@ 0.0 B [ ] libx32
|
|
@ 0.0 B [ ] lib64
|
|
@ 0.0 B [ ] lib32
|
|
@ 0.0 B [ ] sbin
|
|
@ 0.0 B [ ] lib
|
|
@ 0.0 B [ ] bin
|
|
```
|
|
|
|
## Ubuntu and Docker August 2024
|
|
|
|
### authorized_keys
|
|
|
|
```bash Thu Jul 25 2024 16:02:13 GMT-0700 (Mountain Standard Time)
|
|
sudo -i
|
|
cat /root/.ssh/authorized_keys
|
|
nano /root/.ssh/authorized_keys
|
|
```
|
|
|
|
```conf Thu Jul 25 2024 16:02:15 GMT-0700 (Mountain Standard Time)
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7khmvc9lTWHALZ/IOMcJNz/1SuvrU53fI43v4PxIJN # 92532396 2023-12-27 mikep@DESKTOP-VP94SPB
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGq7b8qtm4fgNxW2lxm+qoxm8Wz7+1uhLQCg7xSlKYL1 # 92683771 2024-01-01 mikep@DESKTOP-BMV4V66
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJqLFW9kYMp9lOTXXYafxLiUADFFKeM5KDzt02E3XeRP # 92691378 2024-01-01 cphar@DESKTOP-KA0LMMJ
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBkS+uvWevmhYNos6MJKVi2auAx6x+xlyOnnvbdEstsz # 92797978 2024-01-03 mikep@DESKTOP-GNECR7R
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKf5fo63+vyYa8E06+HOPg24e9VMsvv/kBsHKGjBBUyz # 92895319 2024-01-05 mike@mike-B365M-DS3H
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGM6ANLH/4dS0YqlsCyoXkznzkgIsDqCTk3YX01XVWd8 # 92909911 2024-01-06 mikep@DESKTOP-H6JG91B
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOwAv1vrRA29GYL0DFSE8nmD5q3gL+vVtFSwhrXObDo4 # 93288214 2024-01-13 infineon\phares@ISCN5CG3256CPS
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH1xPVOisKwW6Xwo/Yh1kx2smt2HJU2/pRjTJf4KdGXo # 97267150 2024-03-28 mike@mike-Default-string
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEDz5WqCKsoaxV+LG/kufLNuiE9K3lqp+B3AqeKXGusX # 97442032 2024-04-01 lphar@DESKTOP-1238PEQ
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID09PhrjIpeNBmUeycnT3xKF8F5TcGL3ZKAvU9YdLj7H # 98747144 2024-04-25 mike@mike-Default-string
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIaZyTLpafZta8W8Uv6uWpgbbj4QL5dde9Rlf06PfdYc # 98824914 2024-04-26 k0308@DESKTOP-0UJ8DD5
|
|
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEFpucyp3FAHn8/9cXvfRegi09DkR6XLugoniEyQ9w0T # 98824924 2024-04-26 mille@DESKTOP-QL2HGEH
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOn/Ptg/k3rOJn32GxrL2J3Bazt/3M9fGWjzP+CW1qXK # 100900455 2024-06-03 lphares0907@penguin
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPMIxGucViHMHFXoM2VBPlvLvMgqNi2BUtTE/D4n778M # 101638217 2024-06-14 mikep@DESKTOP-VVO6KCM
|
|
```
|
|
|
|
```bash Thu Jul 25 2024 16:02:34 GMT-0700 (Mountain Standard Time)
|
|
exit
|
|
```
|
|
|
|
### Timezone
|
|
|
|
```bash Thu Jul 25 2024 16:10:06 GMT-0700 (Mountain Standard Time)
|
|
timedatectl set-timezone America/Phoenix
|
|
date
|
|
# Thu Jul 25 04:03:08 PM MST 2024
|
|
```
|
|
|
|
```bash Thu Jul 25 2024 16:10:08 GMT-0700 (Mountain Standard Time)
|
|
apt-get update
|
|
apt upgrade -y
|
|
```
|
|
|
|
### Create Users
|
|
|
|
```bash Thu Jul 25 2024 16:10:13 GMT-0700 (Mountain Standard Time)
|
|
adduser podman
|
|
mkdir /home/podman/.ssh
|
|
cp /root/.ssh/authorized_keys /home/podman/.ssh/authorized_keys
|
|
chown podman:podman -R /home/podman
|
|
#
|
|
adduser lphares
|
|
#
|
|
mkdir /home/lphares/.ssh
|
|
cp /root/.ssh/authorized_keys /home/lphares/.ssh/authorized_keys
|
|
chown lphares:lphares -R /home/lphares
|
|
#
|
|
adduser bmiller
|
|
#
|
|
mkdir /home/bmiller/.ssh
|
|
cp /root/.ssh/authorized_keys /home/bmiller/.ssh/authorized_keys
|
|
chown bmiller:bmiller -R /home/bmiller
|
|
```
|
|
|
|
### Directory Share
|
|
|
|
```bash Mon Thu Jul 25 2024 16:10:17 GMT-0700 (Mountain Standard Time)
|
|
adduser bmiller lphares
|
|
sudo usermod -a -G lphares bmiller
|
|
newgrp lphares
|
|
systemctl restart ssh
|
|
```
|
|
|
|
### Disable IPv6
|
|
|
|
```bash Fri Jul 26 2024 10:45:27 GMT-0700 (Mountain Standard Time)
|
|
# https://intercom.help/privatevpn/en/articles/6440374-how-to-disable-ipv6-on-ubuntu-and-fedora-linux
|
|
nano /etc/sysctl.conf
|
|
```
|
|
|
|
```conf Fri Jul 26 2024 10:45:30 GMT-0700 (Mountain Standard Time)
|
|
net.ipv6.conf.all.disable_ipv6 = 1
|
|
net.ipv6.conf.default.disable_ipv6 = 1
|
|
net.ipv6.conf.lo.disable_ipv6 = 1
|
|
```
|
|
|
|
```bash Fri Jul 26 2024 10:45:34 GMT-0700 (Mountain Standard Time)
|
|
sysctl -p
|
|
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
|
|
exit
|
|
reboot
|
|
```
|
|
|
|
```bash Fri Jul 26 2024 10:45:38 GMT-0700 (Mountain Standard Time)
|
|
nano /etc/default/grub
|
|
```
|
|
|
|
```conf Fri Jul 26 2024 10:45:47 GMT-0700 (Mountain Standard Time)
|
|
# https://opensource.com/article/22/8/disable-ipv6
|
|
# GRUB_CMDLINE_LINUX_DEFAULT=""
|
|
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"
|
|
# GRUB_CMDLINE_LINUX=""
|
|
GRUB_CMDLINE_LINUX="ipv6.disable=1"
|
|
```
|
|
|
|
```bash Fri Jul 26 2024 10:45:51 GMT-0700 (Mountain Standard Time)
|
|
grub-mkconfig
|
|
exit
|
|
reboot
|
|
```
|
|
|
|
### Cockpit
|
|
|
|
- [cockpit](https://cockpit-project.org/)
|
|
- [podman](https://192.168.11.2:9090/podman#/?container=all)
|
|
|
|
```bash Fri Jul 26 2024 10:45:55 GMT-0700 (Mountain Standard Time)
|
|
# apt install chkservice -y
|
|
apt-cache rdepends cockpit
|
|
apt install cockpit -y
|
|
passwd phares
|
|
# https://192.168.11.10:9090
|
|
# https://blog.while-true-do.io/podman-web-ui-via-cockpit/
|
|
apt-get install cockpit cockpit-podman -y
|
|
systemctl enable --now cockpit.socket
|
|
```
|
|
|
|
### Podman Quadlet
|
|
|
|
```bash Thu Jul 25 2024 16:30:13 GMT-0700 (Mountain Standard Time)
|
|
apt-get install podman -y
|
|
apt-cache rdepends podman-compose
|
|
apt-get install podman-compose -y
|
|
# apt-get remove podman-compose -y
|
|
# apt-get purge podman-compose -y
|
|
adduser podman sudo
|
|
sudo -iu podman
|
|
loginctl enable-linger
|
|
```
|
|
|
|
### how to run a shell scripts at every login
|
|
|
|
- [how-to-run-a-shell-scripts-at-every-login](https://serverfault.com/questions/782433/how-to-run-a-shell-scripts-at-every-login-in-centos)
|
|
|
|
```bash Fri Jul 26 2024 22:29:56 GMT-0700 (Mountain Standard Time)
|
|
nano ~/.bash_profile
|
|
cd ~/
|
|
echo "export XDG_RUNTIME_DIR=/run/user/$(id -u)" > ~/.bashrc.d/systemd
|
|
source ~/.bashrc.d/systemd
|
|
loginctl enable-linger 1002
|
|
systemctl --user daemon-reload
|
|
podman ps -a --sort names
|
|
```
|
|
|
|
### Harddrive
|
|
|
|
```bash Thu Jul 25 2024 16:44:03 GMT-0700 (Mountain Standard Time)
|
|
apt install smartmontools
|
|
smartctl -i /dev/sda
|
|
```
|
|
|
|
```yaml Thu Jul 25 2024 16:44:05 GMT-0700 (Mountain Standard Time)
|
|
Model Family: SK hynix SATA SSDs
|
|
Device Model: SHGS31-500GS-2
|
|
Serial Number: EN08N831310108V0W
|
|
Firmware Version: 90000Q00
|
|
User Capacity: 500,107,862,016 bytes [500 GB]
|
|
Sector Sizes: 512 bytes logical, 4096 bytes physical
|
|
Rotation Rate: Solid State Device
|
|
Form Factor: 2.5 inches
|
|
TRIM Command: Available, deterministic
|
|
Device is: In smartctl database 7.3/5528
|
|
ATA Version is: ACS-3 (minor revision not indicated)
|
|
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
|
|
Local Time is: Sun Aug 4 16:18:30 2024 MST
|
|
SMART support is: Available - device has SMART capability.
|
|
SMART support is: Enabled
|
|
```
|