Jelajahi Sumber

0413: Setting up LDAP Authentication for ProxMox VE

i12bretro 3 tahun lalu
induk
melakukan
aeabdb9077
1 mengubah file dengan 138 tambahan dan 0 penghapusan
  1. 138 0
      0413.html

+ 138 - 0
0413.html

@@ -0,0 +1,138 @@
+    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>Setting up LDAP Authentication for ProxMox VE</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+								<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
+				        <script type="text/javascript">
+          $(function(){
+            $('textarea').each(function(i,e){
+              theTextarea = $(this);
+              theTextarea.height((theTextarea[0].scrollHeight-5) +'px');
+            });
+
+            $('li').each(function(i,e){
+							if(!$(this).hasClass('noCheckbox')){
+								var uuid = 'li_' + Math.floor(Math.random() * Math.floor(1000000)).toString() + '_' + i.toString();
+								$(this).contents().wrap('<span id="'+ uuid +'"><label for="cb_'+ uuid +'"></label></span>');
+								$(this).prepend('<input type="checkbox" class="completeBox" id="cb_' + uuid +'" rel="'+ uuid +'" />')
+							}
+            });
+
+            $('code,div.codeBlock,textarea.codeBlock').each(function(i,e){
+              theElement = $(this);
+              var lines = theElement.html().split("\n");
+              theElement.empty();
+              for(l=0;l<lines.length;l++){
+                if($.trim(lines[l]) != '' && $.trim(lines[l]).substr(0,1) != '#' && $.trim(lines[l]).indexOf(' #') == -1 && lines[l].substr(0, 4).toUpperCase() != 'REM '){
+									                  theElement.append('<input type="image" src="images/clipboard.png" value="" class="copy-text" rel="copy_'+ i +'_'+ l +'" data-clipboard-text="'+ $.trim(lines[l].replace(/"/g, '&quot;')) +'" /><span id="copy_'+ i +'_'+ l +'">'+ lines[l] +'</span>');
+									                } else {
+                  theElement.append(lines[l]);
+                }
+              }
+            });
+
+            $(document).on('click','input.copy-text',function(){
+              theButton = $(this);
+														$('input.copy-text').attr('src','images/clipboard.png');
+							              $('span.copy-animation,span.copy-animation-ps').removeClass('copy-animation copy-animation-ps');
+              try {
+                if($('#'+ theButton.attr('rel')).parent('div').hasClass('PS')){
+                  $('#'+ theButton.attr('rel')).addClass('copy-animation-ps');
+								} else if($('#'+ theButton.attr('rel')).parent('div').hasClass('CMD')){
+									$('#'+ theButton.attr('rel')).addClass('copy-animation-cmd');
+                } else {
+                  $('#'+ theButton.attr('rel')).addClass('copy-animation');
+                }
+                navigator.clipboard.writeText(theButton.data('clipboard-text').replace(/<[^>]*>?/gm, ''));
+																theButton.attr('src','images/clipboard_active.png');
+								              } catch(err) {
+              }
+              return false;
+            });
+
+            $(document).on('click','input.completeBox',function(){
+              theBox = $(this);
+              $('#'+ theBox.attr('rel')).addClass('strikethrough');
+              theBox.prop('disabled',true);
+              theBox.parent('li').prevAll().each(function(i,e){
+                theLI = $(this);
+                if(theLI.find('input[type=checkbox]').not(':checked')){
+                  $('#'+ theLI.find('input[type=checkbox]').attr('rel')).addClass('strikethrough');
+                  theLI.find('input[type=checkbox]').prop('checked',true).prop('disabled',true);
+                }
+              });
+            });
+
+            if(window.self !== window.top){
+															window.parent.$('iframe.stepsFrame').height((this['scrollingElement']['scrollHeight']+20) +'px');
+							            }
+          });
+        </script>
+        <link href="css/steps.css" rel="stylesheet" type="text/css" />
+      </head>
+      <body>
+        <div id="gridContainer">
+          <div class="topMargin"></div>
+          <div id="listName" class="topMargin">
+            <h1>Setting up LDAP Authentication for ProxMox VE</h1>
+          </div>
+          <div></div>
+          <div id="content">
+          <p><em>NOTE: ProxMox does not like spaces in user or group names</em></p>
+
+<h2>Create VMAdmins Group</h2>
+
+<ol>
+	<li>Click the Start button &gt; Windows Administrative Tools &gt; Active Directory Users and Computers</li>
+	<li>Expand the domain name</li>
+	<li>Right click on the Users container &gt; New &gt; Group</li>
+	<li>Name the group VMAdmins &gt; Click OK</li>
+	<li>Double click the newly created VMAdmins group</li>
+	<li>Select the Members tab &gt; Click the Add... button</li>
+	<li>Add users who will be administrators for the ProxMox host</li>
+</ol>
+
+<h2>Configuring LDAP Authentication in ProxMox VE</h2>
+
+<ol>
+	<li>Open a web browser and navigate to the ProxMox VE web UI</li>
+	<li>Log in</li>
+	<li>Select Datacenter in the left navigation menu</li>
+	<li>Select Permissions &gt; Authentication in the left sub navigation menu</li>
+	<li>Click the Add dropdown &gt; LDAP Server</li>
+	<li>Fill out the LDAP Server form as shown below
+	<p>Realm: i12bretro.local<br />
+	Base Domain Name: CN=Users,DC=i12bretro,DC=local<br />
+	Server: 10.10.27.1<br />
+	User Attribute Name: sAMAccountName</p>
+	</li>
+	<li>Click the Sync Options button at the top</li>
+	<li>Fill out the Sync Options form as shown below
+	<p>Bind User: CN=readonly_svc,CN=Users,DC=i12bretro,DC=local<br />
+	Bind Password: Read0nly!!<br />
+	E-Mail attribute: mail<br />
+	User classes: person, user<br />
+	Group classes: group<br />
+	User Filter: (&amp;(memberOf=CN=VMAdmins,CN=Users,DC=i12bretro,DC=local))<br />
+	Group Filter: (&amp;(distinguishedName=CN=VMAdmins,CN=Users,DC=i12bretro,DC=local))<br />
+	Scope: Users and Groups<br />
+	Enable new users: Yes<br />
+	Full: Yes<br />
+	Purge: Yes</p>
+	</li>
+	<li>Click the Add button</li>
+	<li>Back on the Authentication page, select the new ldap authentication and click the Sync button</li>
+	<li>Click the Preview button to test the sync without creating or modifying anything</li>
+	<li>If the users and groups display as expected, close the preview and re-run the sync to create the users and groups</li>
+	<li>Select Permissions in the left sub navigation menu</li>
+	<li>Click Add &gt; Group Permission from the dropdown at the top of the page</li>
+	<li>Set the path to /, select the VMAdmins group from the dropdown and select the desired Role &gt; Click Add</li>
+	<li>Select the user dropdown in the top right of the screen &gt; Logout</li>
+	<li>Log in with one of the LDAP users in the VMAdmins group, making sure to set the Realm to the domain realm created earlier</li>
+</ol>
+          </div>
+        </div>
+      </body>
+    </html>
+