diff --git a/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md b/os/FreeBSD/FreeBSD_on_Lenovo_Thinkcentre.md index 1eb792a..d1c95b5 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 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. Use this vim command: + +``` +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 @@ -66,22 +81,15 @@ KbdInteractiveAuthentication no #UsePAM yes ``` -Test the setting +Test the setting and reload ```sh sshd -t -``` - -Reload: - -```sh 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 @@ -105,7 +113,7 @@ pass out all keep state ``` ```sh -sysrc pf_enable=yes +service pf enable service pf start ```