<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SOLVED: SSHD &#8220;/bin/bash:permission denied&#8221; on Windows 7</title>
	<atom:link href="http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/</link>
	<description>A place where Ankur posts random thoughts, mostly personal and technology related.</description>
	<lastBuildDate>Fri, 14 Oct 2011 16:15:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: philmill</title>
		<link>http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/comment-page-1/#comment-90235</link>
		<dc:creator>philmill</dc:creator>
		<pubDate>Tue, 06 Sep 2011 16:01:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.ankurshah.net/blog/?p=166#comment-90235</guid>
		<description>**I put the wrong UR on: 
SeAssignPrimaryTokenPrivilege -&gt; UR:Impersonate a client after auth

It should be:
SeAssignPrimaryTokenPrivilege -&gt; UR:Replace a process level token

(UR:Impersonate a client after auth -&gt; SeImpersonatePrivilege)

Sorry about that.</description>
		<content:encoded><![CDATA[<p>**I put the wrong UR on:<br />
SeAssignPrimaryTokenPrivilege -&gt; UR:Impersonate a client after auth</p>
<p>It should be:<br />
SeAssignPrimaryTokenPrivilege -&gt; UR:Replace a process level token</p>
<p>(UR:Impersonate a client after auth -&gt; SeImpersonatePrivilege)</p>
<p>Sorry about that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PhilMill</title>
		<link>http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/comment-page-1/#comment-89827</link>
		<dc:creator>PhilMill</dc:creator>
		<pubDate>Fri, 02 Sep 2011 19:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.ankurshah.net/blog/?p=166#comment-89827</guid>
		<description>Thank you so much for this entry. I would have never figured this one out.

Had to map these permissions over to Group Policy, and figured others might need to know the mappings.
All setting are in Local Security Settings -&gt; Local Policies -&gt; User Rights (UR):

SeTcbPrivilege -&gt; UR:Act as part of OS
SeAssignPrimaryTokenPrivilege -&gt; UR:Impersonate a client after auth
SeCreateTokenPrivilege -&gt; UR:Create a token object
SeDenyInteractiveLogonRight -&gt; UR:Deny log on locally 
SeDenyNetworkLogonRight -&gt; UR:Deny Access to this computer from the network
SeDenyRemoteInteractiveLogonRight -&gt; Deny login through TS
SeIncreaseQuotaPrivilege -&gt; UR:Adjust memory quotas for a process
SeServiceLogonRight -&gt; UR:Log on as a service

Cheers,
Phil</description>
		<content:encoded><![CDATA[<p>Thank you so much for this entry. I would have never figured this one out.</p>
<p>Had to map these permissions over to Group Policy, and figured others might need to know the mappings.<br />
All setting are in Local Security Settings -&gt; Local Policies -&gt; User Rights (UR):</p>
<p>SeTcbPrivilege -&gt; UR:Act as part of OS<br />
SeAssignPrimaryTokenPrivilege -&gt; UR:Impersonate a client after auth<br />
SeCreateTokenPrivilege -&gt; UR:Create a token object<br />
SeDenyInteractiveLogonRight -&gt; UR:Deny log on locally<br />
SeDenyNetworkLogonRight -&gt; UR:Deny Access to this computer from the network<br />
SeDenyRemoteInteractiveLogonRight -&gt; Deny login through TS<br />
SeIncreaseQuotaPrivilege -&gt; UR:Adjust memory quotas for a process<br />
SeServiceLogonRight -&gt; UR:Log on as a service</p>
<p>Cheers,<br />
Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BellsTheorem</title>
		<link>http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/comment-page-1/#comment-86890</link>
		<dc:creator>BellsTheorem</dc:creator>
		<pubDate>Sun, 07 Aug 2011 23:11:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.ankurshah.net/blog/?p=166#comment-86890</guid>
		<description>Also, add sshd to administrators group in windows user management.</description>
		<content:encoded><![CDATA[<p>Also, add sshd to administrators group in windows user management.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BellsTheorem</title>
		<link>http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/comment-page-1/#comment-86889</link>
		<dc:creator>BellsTheorem</dc:creator>
		<pubDate>Sun, 07 Aug 2011 23:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.ankurshah.net/blog/?p=166#comment-86889</guid>
		<description>Thanks so much!!!!
Here&#039;s how i got sshd working on win7. (i am using username sshd rather than sshd_server) 
I started with http://pigtail.net/LRP/printsrv/cygwin-sshd.html 
and then
chown sshd /etc/ssh*
chown sshd  /var/empty

After running ssh-host-config , i had to open up Computer Manager / local user and groups and select properties for the sshd user and untick &quot;disabled&quot; and tick &quot;password never expires&quot;

After all that, i was getting the /bin/bash: Permission denied problem and found your page and run the following and then it all worked !!

editrights -a SeTcbPrivilege -u sshd
editrights -a SeAssignPrimaryTokenPrivilege -u sshd
editrights -a SeCreateTokenPrivilege -u sshd
editrights -a SeDenyInteractiveLogonRight -u sshd
editrights -a SeDenyNetworkLogonRight -u sshd
editrights -a SeDenyRemoteInteractiveLogonRight -u sshd
editrights -a SeIncreaseQuotaPrivilege -u sshd
editrights -a SeServiceLogonRight -u sshd

I would have never figured that out!</description>
		<content:encoded><![CDATA[<p>Thanks so much!!!!<br />
Here&#8217;s how i got sshd working on win7. (i am using username sshd rather than sshd_server)<br />
I started with <a href="http://pigtail.net/LRP/printsrv/cygwin-sshd.html" rel="nofollow">http://pigtail.net/LRP/printsrv/cygwin-sshd.html</a><br />
and then<br />
chown sshd /etc/ssh*<br />
chown sshd  /var/empty</p>
<p>After running ssh-host-config , i had to open up Computer Manager / local user and groups and select properties for the sshd user and untick &#8220;disabled&#8221; and tick &#8220;password never expires&#8221;</p>
<p>After all that, i was getting the /bin/bash: Permission denied problem and found your page and run the following and then it all worked !!</p>
<p>editrights -a SeTcbPrivilege -u sshd<br />
editrights -a SeAssignPrimaryTokenPrivilege -u sshd<br />
editrights -a SeCreateTokenPrivilege -u sshd<br />
editrights -a SeDenyInteractiveLogonRight -u sshd<br />
editrights -a SeDenyNetworkLogonRight -u sshd<br />
editrights -a SeDenyRemoteInteractiveLogonRight -u sshd<br />
editrights -a SeIncreaseQuotaPrivilege -u sshd<br />
editrights -a SeServiceLogonRight -u sshd</p>
<p>I would have never figured that out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/comment-page-1/#comment-57309</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 13 Aug 2010 08:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.ankurshah.net/blog/?p=166#comment-57309</guid>
		<description>@Ankur Shah: I experienced the same problem several times by now. For me it seems as if the sshd-host-config script isn&#039;t able to set these privileges correctly on Domain Controllers. After I used the editrights commands above I was able to render sshd usable on all trouble-machines. 

@Nicholas Fone: YES - the privileges may be overwritten by group policies pushed from the each Domain Controller. This mustn&#039;t be caused by auditing software. Just check back with the Microsoft Infrastructure Admins of your company - they could even setup a domain user account to be used with the local sshd-installs for you (easier managemen: only one user for all sshd-installs instead of one local account on each sshd-enabled machine).</description>
		<content:encoded><![CDATA[<p>@Ankur Shah: I experienced the same problem several times by now. For me it seems as if the sshd-host-config script isn&#8217;t able to set these privileges correctly on Domain Controllers. After I used the editrights commands above I was able to render sshd usable on all trouble-machines. </p>
<p>@Nicholas Fone: YES &#8211; the privileges may be overwritten by group policies pushed from the each Domain Controller. This mustn&#8217;t be caused by auditing software. Just check back with the Microsoft Infrastructure Admins of your company &#8211; they could even setup a domain user account to be used with the local sshd-installs for you (easier managemen: only one user for all sshd-installs instead of one local account on each sshd-enabled machine).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Fone</title>
		<link>http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/comment-page-1/#comment-55154</link>
		<dc:creator>Nicholas Fone</dc:creator>
		<pubDate>Wed, 07 Jul 2010 15:55:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.ankurshah.net/blog/?p=166#comment-55154</guid>
		<description>Correction to my post above (dated June 25th, 2010 at 2:10pm):

A privileged user is created by ssh-host-config, regardless of whether the answer to the &quot;privilege separation&quot; question is &quot;yes&quot; or &quot;no&quot;.

Cheers,
Nick</description>
		<content:encoded><![CDATA[<p>Correction to my post above (dated June 25th, 2010 at 2:10pm):</p>
<p>A privileged user is created by ssh-host-config, regardless of whether the answer to the &#8220;privilege separation&#8221; question is &#8220;yes&#8221; or &#8220;no&#8221;.</p>
<p>Cheers,<br />
Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Fone</title>
		<link>http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/comment-page-1/#comment-54657</link>
		<dc:creator>Nicholas Fone</dc:creator>
		<pubDate>Fri, 25 Jun 2010 18:10:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.ankurshah.net/blog/?p=166#comment-54657</guid>
		<description>Actually, I just confirmed, a privileged user *is* created, even when &quot;privilege separation&quot; is used for sshd.

Cheers,
Nick</description>
		<content:encoded><![CDATA[<p>Actually, I just confirmed, a privileged user *is* created, even when &#8220;privilege separation&#8221; is used for sshd.</p>
<p>Cheers,<br />
Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Fone</title>
		<link>http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/comment-page-1/#comment-54656</link>
		<dc:creator>Nicholas Fone</dc:creator>
		<pubDate>Fri, 25 Jun 2010 17:46:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.ankurshah.net/blog/?p=166#comment-54656</guid>
		<description>Thanks Ankur. Great article!

Btw, the list of privileges that the sshd_server user needs is defined in:
/usr/share/csih/cygwin-service-installation-helper.sh

The above script is called by the install script for sshd: ssh-host-config

I believe the privileges are only required if sshd is configured to use &quot;privilege separation&quot;, though it is most likely less secure to run sshd without &quot;privilege separation&quot;.

In our case, we suspect that some of the required privileges on the sshd_server user were being deleted periodically, perhaps by some &quot;helpful&quot; security auditing software, which is quite likely as we&#039;re in a large corporate environment :)

Cheers,
Nick</description>
		<content:encoded><![CDATA[<p>Thanks Ankur. Great article!</p>
<p>Btw, the list of privileges that the sshd_server user needs is defined in:<br />
/usr/share/csih/cygwin-service-installation-helper.sh</p>
<p>The above script is called by the install script for sshd: ssh-host-config</p>
<p>I believe the privileges are only required if sshd is configured to use &#8220;privilege separation&#8221;, though it is most likely less secure to run sshd without &#8220;privilege separation&#8221;.</p>
<p>In our case, we suspect that some of the required privileges on the sshd_server user were being deleted periodically, perhaps by some &#8220;helpful&#8221; security auditing software, which is quite likely as we&#8217;re in a large corporate environment <img src='http://www.ankurshah.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cheers,<br />
Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Selinsa</title>
		<link>http://www.ankurshah.net/blog/2009/10/solved-sshd-binbashpermission-denied-on-windows-7/comment-page-1/#comment-52698</link>
		<dc:creator>Selinsa</dc:creator>
		<pubDate>Wed, 12 May 2010 20:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.ankurshah.net/blog/?p=166#comment-52698</guid>
		<description>very well information you write it very 

clean. I&#039;m very lucky to get this information from you.</description>
		<content:encoded><![CDATA[<p>very well information you write it very </p>
<p>clean. I&#8217;m very lucky to get this information from you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
