Add a sed to set invalid password hash; set default branch name system wide

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@24101 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Thomas Trepl 2021-01-11 21:19:14 +00:00
parent d186c30ddd
commit 1e72aaad66

View File

@ -62,7 +62,8 @@
</para>
<screen role="root"><userinput>groupadd -g &gitgid; git &amp;&amp;
useradd -c "git Owner" -d /home/git -m -g git -s /usr/bin/git-shell -u &gituid; git</userinput></screen>
useradd -c "git Owner" -d /home/git -m -g git -s /usr/bin/git-shell -u &gituid; git &amp;&amp;
sed -i '/git/s/git:.*:/git:NP:/' /etc/shadow</userinput></screen>
<para>
Create some files and directories in the home directory of the git user
@ -89,7 +90,7 @@ cat &lt;user-ssh-key&gt; &gt;&gt; /home/git/.ssh/authorized_keys</userinput></sc
<systemitem class='username'>root</systemitem> user, run:
</para>
<screen role="nodump"><userinput>git config --global init.defaultBranch trunk</userinput></screen>
<screen role="nodump"><userinput>git config --system init.defaultBranch trunk</userinput></screen>
<para>
Finally add the <filename>/usr/bin/git-shell</filename> entry to