Hi,<br><br><div><span class="gmail_quote">2008/1/30, John Arbash Meinel &lt;<a href="mailto:john@arbash-meinel.com">john@arbash-meinel.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
alex mitchell wrote:<br>&gt; Is there any way to do this? I&#39;ve tried restricting login by setting the<br>&gt; users&#39; shell to /bin/false, which stops the users from logging in, but this<br>&gt; also blocks bzr from connecting using sftp. Can I block users from logging<br>
&gt; in, but still allow bzr to have access to read/write to the files within the<br>&gt; repository?<br><br>You can use the &quot;contrib/bzr_access&quot; script which is intended to control<br>access based on SSH key.<br>
<br>It doesn&#39;t do as much access control as people would like, but it does<br>provide exactly what you are asking here.<br><br>It would only allow people to run &quot;bzr_access&quot;, and thus only &quot;bzr+ssh&quot;<br>
connections. It is also designed to chroot the bzr process, so they<br>cannot access all files on the remote system.<br><br>You set it up by adding a line to .ssh/authorized_key like:<br><br>&nbsp;&nbsp;command=&quot;/path/to/bzr_access /path/to/bzr /path/to/repo username&quot;<br>
SSHKEYINFO<br><br>John<br>=:-&gt;<br></blockquote></div><br>I never noticed the bzr_access script in contrib. Cool. I might switch to that.<br><br>I once created the attached script and set it as shell for my bzr user.<br>
It
does not use the command option of ssh keys, it just checks if &quot;bzr
serve&quot; is somewhere in the command argument given by ssh and starts bzr
serve hard coded (not through the command environment variable).<br>
<br>It lacks the read/write distinction that bzr_access has, and only serves a hard coded repository.<br><br>Cheers,<br><span class="sg">&nbsp;-Olaf</span><br>