Skip to content

Commit 68aed09

Browse files
authored
Merge pull request #734 from jhhayashi/fix-chsh-cmd
Modify command to change git user's login shell
2 parents 1dd6185 + a5a7bdd commit 68aed09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/04-git-server/sections/setting-up-server.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ $ which git-shell # make sure git-shell is installed on your system.
9494
$ sudo vim /etc/shells # and add the path to git-shell from last command
9595
----
9696

97-
Now you can edit the shell for a user using `chsh <username>`:
97+
Now you can edit the shell for a user using `chsh <username> -s <shell>`:
9898

9999
[source,console]
100100
----
101-
$ sudo chsh git # and enter the path to git-shell, usually: /usr/bin/git-shell
101+
$ sudo chsh git -s $(which git-shell)
102102
----
103103

104104
Now, the `git` user can only use the SSH connection to push and pull Git repositories and can't shell onto the machine.

0 commit comments

Comments
 (0)