Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000553.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml" />
11
12    <title>Status for Andrew DeFaria: More woes with 2003 Server and sshd</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/000552.html" title="sons-sc-cc crontab and checking in files" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000554.html" title="Osaka Builds on Windows" />
17
18    
19
20    
21
22    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
23 </head>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
25    <div id="container">
26       <div id="container-inner" class="pkg">
27
28          <div id="banner">
29             <div id="banner-inner" class="pkg">
30                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
31                <h2 id="banner-description">Searchable status reports and work log</h2>
32             </div>
33          </div>
34
35          <div id="pagebody">
36             <div id="pagebody-inner" class="pkg">
37                <div id="alpha">
38                   <div id="alpha-inner" class="pkg">
39
40                      <p class="content-nav">
41                         <a href="http://defaria.com/blogs/Status/archives/000552.html">&laquo; sons-sc-cc crontab and checking in files</a> |
42                         <a href="http://defaria.com/blogs/Status/">Main</a>
43                         | <a href="http://defaria.com/blogs/Status/archives/000554.html">Osaka Builds on Windows &raquo;</a>
44                      </p>
45
46                      <a id="a000553"></a>
47                      <div class="entry" id="entry-553">
48                         <h3 class="entry-header">More woes with 2003 Server and sshd</h3>
49                         <div class="entry-content">
50                            <div class="entry-body">
51                               <p>I don't see how my tinkering with things could have messed up IPSEC. I did mess with the Local Computer Polices and Default Domain Policies attempting to add rights to the local user sons-sc-cc\sshd_server. I'm not sure how this effects IPSEC. This user is used by the sshd and inetd Cygwin services. Since these services need to "switch user" to the user ssh'ing or rsh'ing they need some elevated rights. Prior to 2003 Server the Local System Account (known as SYSTEM in Cygwin) had enough rights to do this. But with 2003 Server Microsoft lessened the rights that the Local System Account has. Cygwin's answer to this is to create a new user ID, sshd_server, and assign it the necessary rights to be able to switch user. Then this user would only be used for Cygwin services. In fact they have a script /bin/ssh-host-config which creates a local sshd_server user for you (as well as sets up the hosts ssh key and adds a service for sshd). However even after running that script ssh was not working.</p>
52
53 <p>The inetd service, which is the <i>super server</i>, provides services like rsh, telnet, ftp, etc. that also needs to switch user. Similarly with cron. You see the service is running as an executable under some users credentials (normally the SYSTEM user) and needs to become the requesting user. So I was trying to run these services by using the local sshd_server user that ssh-host-config creates and adds the necessary rights to switch user.</p>
54
55 <p>Since I was having troubles I was removing the locally created sshd_server user and having the ssh-host-config script recreate it. At one time I decided to run mmc and add the Group Policy snap in then go under Local Computer Policy: Computer Configuration: Windows Settings: Local Policies: User Rights Assignment and make that the local sshd_server user had the following rights:</p>
56
57 <ol>
58   <li>Create a token object</li>
59
60   <li>Logon as a service</li>
61
62   <li>Replace a process level token</li>
63
64   <li>Increase Quota</li>
65 </ol>
66
67 <p>One time, when adding the Group Policy Object Editor I decided to click
68 on the Browse button and saw a Default Domain Policy and thought perhaps there was something in there overriding the Local Computer Policy. So I added that and again I made sure that sons-sc-cc\sshd_server had the above rights. I have put a copy of this mmc polices thing under C:\Polcies.msc in case Ron wants to look at it. I notice a number of SIDs in there, probably from my past creations and recreations of  sons-sc-cc\sshd_server.</p>
69
70 <p>As I don't know what Ron did to get sons-sc-cc running again and as I
71 see the local sshd_server as having only deny network login right I don't want to mess with anything. Right now rsh is still broken as inetd cannot switch user since it's using the sshd_server user and that user doesn't have enough rights.</p>
72
73 <p>Here's an exert from /usr/share/doc/Cygwin/openssh.README:</p>
74
75 <blockquote>
76   <h3>Important note for Windows 2003 Server users:</h3>
77
78   <p>2003 Server has a funny new feature. When starting services under SYSTEM account, these services have nearly all user rights which SYSTEM holds... except for the "Create a token object" right, which is needed to allow public key authentication :-(</p>
79
80   <p>There's no way around this, except for creating a substitute account which has the appropriate privileges.  Basically, this account should be member of the administrators group, plus it should have the following user rights:</p>
81
82   <ol>
83     <li>Create a token object</li>
84
85     <li>Logon as a service</li>
86
87     <li>Replace a process level token</li>
88
89     <li>Increase Quota</li>
90   </ol>
91
92   <p>The ssh-host-config script asks you, if it should create such an account, called "sshd_server".  If you say "no" here, you're on your own.  Please follow the instruction in ssh-host-config exactly if possible.  Note that ssh-user-config sets the permissions on 2003 Server machines dependent
93 of whether a sshd_server account exists or not.</p>
94 </blockquote>
95
96                            </div>
97                            <div id="more" class="entry-more">
98                               
99                            </div>
100                         </div>
101                         <p class="entry-footer">
102                            <span class="post-footers">Posted by  on May 22, 2006 10:28 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000553.html">Permalink</a>
103                         </p>
104                      </div>
105
106                      
107
108                      
109                   </div>
110                </div>
111             </div>
112          </div>
113       </div>
114    </div>
115 </body>
116 </html>