From 9a8258d70340b77195b911722c0de2a7ef5597bc Mon Sep 17 00:00:00 2001 From: Rex Kerr Date: Wed, 13 Feb 2019 23:12:17 -0800 Subject: [PATCH] Fix usage of sudo to edit file vim should not be run as root, but instead use `sudo -e` (or sudoedit) which creates a temporary copy of the file to edit and then copies it over the original if you modify the contents. --- book/04-git-server/sections/setting-up-server.asc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/04-git-server/sections/setting-up-server.asc b/book/04-git-server/sections/setting-up-server.asc index 642f43dda..17fd9dbdb 100644 --- a/book/04-git-server/sections/setting-up-server.asc +++ b/book/04-git-server/sections/setting-up-server.asc @@ -97,7 +97,7 @@ To do so, you must first add the full pathname of the `git-shell` command to `/e ---- $ cat /etc/shells # see if `git-shell` is already in there. If not... $ which git-shell # make sure git-shell is installed on your system. -$ sudo vim /etc/shells # and add the path to git-shell from last command +$ sudo -e /etc/shells # and add the path to git-shell from last command ---- Now you can edit the shell for a user using `chsh -s `: