From 353db04e1aba6d88c6ad8104b5b01965ef9635e4 Mon Sep 17 00:00:00 2001 From: Moni Ghaoui Date: Wed, 10 Dec 2025 22:03:38 +0100 Subject: [PATCH 1/3] doas --- os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md b/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md index 1eb792a..3eee02e 100644 --- a/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md +++ b/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md @@ -21,15 +21,30 @@ pkg update Install my favorite packages ```sh -pkg install -y bash sudo tmux htop neovim git ncdu bastille tailscale aria2 +pkg install -y bash doas tmux htop neovim git ncdu bastille tailscale aria2 ``` -Add "wheel" to the suoers file. You need to run `visudo` and uncomment the line that starts with `%wheel`: +For doas you need to copy the config file: ```sh -visudo +cp /usr/local/etc/doas.conf.sample /usr/local/etc/doas.conf +nvim /usr/local/etc/doas.conf ``` +Remove all the stuff about alice, bob, cindy and david. Keep the wheel. + +``` +g/\\|\\|\\|\/d +``` + +To switch to root you can do: + +```sh +doas -s +``` + +... which means switch to a shell the default is root's. + Change shell ```sh From 2b76d9fc9c493672c660a7ee878b78767c7e19f9 Mon Sep 17 00:00:00 2001 From: Moni Ghaoui Date: Wed, 10 Dec 2025 22:05:11 +0100 Subject: [PATCH 2/3] x --- os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md b/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md index 3eee02e..cd8cf5a 100644 --- a/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md +++ b/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md @@ -81,15 +81,10 @@ KbdInteractiveAuthentication no #UsePAM yes ``` -Test the setting +Test the setting and reload ```sh sshd -t -``` - -Reload: - -```sh service sshd reload ``` From 97dca92181f840b87c3e7d83ed8197d7728fbdb1 Mon Sep 17 00:00:00 2001 From: Moni Ghaoui Date: Wed, 10 Dec 2025 22:31:43 +0100 Subject: [PATCH 3/3] park Bastille for now --- os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md b/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md index cd8cf5a..d1c95b5 100644 --- a/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md +++ b/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md @@ -21,7 +21,7 @@ pkg update Install my favorite packages ```sh -pkg install -y bash doas tmux htop neovim git ncdu bastille tailscale aria2 +pkg install -y bash doas tmux htop neovim git ncdu tailscale aria2 ``` For doas you need to copy the config file: @@ -31,7 +31,7 @@ cp /usr/local/etc/doas.conf.sample /usr/local/etc/doas.conf nvim /usr/local/etc/doas.conf ``` -Remove all the stuff about alice, bob, cindy and david. Keep the wheel. +Remove all the stuff about alice, bob, cindy and david. Keep the wheel. Use this vim command: ``` g/\\|\\|\\|\/d @@ -90,8 +90,6 @@ service sshd reload # PF -Note, if you're using Bastille, the `/etc/pf.conf` file is going to look different. See [Bastille](../FreeBSD/Bastille/Bastille.md). - Now we need to get the filewall going. ```sh @@ -115,7 +113,7 @@ pass out all keep state ``` ```sh -sysrc pf_enable=yes +service pf enable service pf start ```