From bc07248695d8e9038d3efcf9388296fd8a8996dd Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sun, 5 Sep 2021 19:21:10 +0200 Subject: Update some notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tweak bogus $(groups | …) command, which happened to work because "debian" was the first group that showed up in the output - "re-open" sh-mode itch --- guides/cloud/vps.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides') diff --git a/guides/cloud/vps.org b/guides/cloud/vps.org index 71fda14..c73a7b9 100644 --- a/guides/cloud/vps.org +++ b/guides/cloud/vps.org @@ -26,7 +26,7 @@ So instead, I'll - create my own user account: ~sudo adduser $name~ - add it to all groups =debian= belongs to: #+begin_src sh - groups=$(groups | sed -e 's/ *debian *//' -e 's/ /,/g') + groups=$(groups | tr ' ' '\n' | grep -v debian | paste -sd,) sudo usermod --append --groups ${groups} ${name} #+end_src - only allow password authentication over SSH for this new user -- cgit v1.2.3