{"id":308,"date":"2011-04-03T20:55:33","date_gmt":"2011-04-04T00:55:33","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=308"},"modified":"2011-04-03T20:55:33","modified_gmt":"2011-04-04T00:55:33","slug":"scripted-dell-remote-access-controller-drac-configuration","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/scripting\/scripted-dell-remote-access-controller-drac-configuration\/","title":{"rendered":"Scripted Dell Remote Access Controller (DRAC) Configuration"},"content":{"rendered":"<p>Recently I had an opportunity to work with several new Dell PowerEdge R810 physical servers.  I needed to remotely connect to the console of these servers and found out they were equipped with Integrated Dell Remote Access Controller 6 &#8211; Enterprise (iDRAC) cards.  Since I had several of these to configure &#8212; and as a scripter am fundamentally opposed to doing things manually &#8212; I started researching how to script this.  <\/p>\n<p>After a bit of Googling, I found out that Dell has a RACADM command that can be used to configure the iDRAC.  You can get the <a href=\"http:\/\/support.us.dell.com\/support\/downloads\/download.aspx?c=us&#038;cs=RC978219&#038;l=en&#038;s=slg&#038;releaseid=R288981&#038;formatcnt=0&#038;libid=0&#038;typeid=-1&#038;dateid=-1&#038;formatid=-1&#038;source=-1&#038;fileid=430167\">Dell RAC configuration utility from Dell<\/a>.  After installing the utility, I opened a command prompt and retreived the configuration from an existing R810 using the following syntax:<\/p>\n<pre>racadm -r 192.168.252.108 -u root -p calvin getconfig -f C:\\252-108_config.cfg<\/pre>\n<p>Looking through the exported configuration, I found several groups and objects that I wanted to specify in my scripted configuration.  Command line switches exist so that you can import an entire configuration file, but I wanted to prompt for certain values and only update the items I wanted to specifically change.  Not wanting to dwell on the script for too long, I put something together rather quick using a simple batch file.  Here is that code&#8230;please feel free to offer suggestions or better solutions in the comments!<\/p>\n<pre><code class=\"language-1\">\r\n@echo off\r\n\r\nset \/P dracIP=\"Please enter the IP address of the DRAC: \"\r\nset \/P dracName=\"Please enter the name of the server to configure: \"\r\nset \/P dracDomain=\"Please enter the DNS domain name to use: \"\r\n\r\n\r\necho These commands need issued individually as the pass arguments from the environment to the server\r\nracadm -r %dracIP% -u root -p calvin config -g cfgLanNetworking -o cfgDNSRacName %dracName%rac\r\nracadm -r %dracIP% -u root -p calvin config -g cfgLanNetworking -o cfgDNSDomainName %dracDomain%\r\nracadm -r %dracIP% -u root -p calvin config -g cfgLanNetworking -o cfgDNSRegisterRac 1\r\nracadm -r %dracIP% -u root -p calvin config -g cfgLanNetworking -o cfgDNSServer1 192.168.8.8\r\nracadm -r %dracIP% -u root -p calvin config -g cfgLanNetworking -o cfgDNSServer2 10.168.8.4\r\n\r\nREM pause\r\necho These commands are going to enable Active Directory Standard Schema configs\r\nracadm -r %dracIP% -u root -p calvin config -g cfgActiveDirectory -o cfgADEnable 1\r\nracadm -r %dracIP% -u root -p calvin config -g cfgActiveDirectory -o cfgADType 2\r\nracadm -r %dracIP% -u root -p calvin config -g cfgActiveDirectory -o cfgADCertValidationEnable 0\r\nracadm -r %dracIP% -u root -p calvin config -g cfgActiveDirectory -o cfgADDcSRVLookupEnable 1\r\nracadm -r %dracIP% -u root -p calvin config -g cfgActiveDirectory -o cfgADDcSRVLookupbyUserdomain 1\r\nracadm -r %dracIP% -u root -p calvin config -g cfgActiveDirectory -o cfgADGcSRVLookupEnable 1\r\nracadm -r %dracIP% -u root -p calvin config -g cfgActiveDirectory -o cfgADGcRootDomain test.local\r\n\r\nREM echo Configure domains to login with\r\nracadm -r %dracIP% -u root -p calvin config -g cfgUserDomain -i 1 -o cfgUserDomainName test.local\r\nracadm -r %dracIP% -u root -p calvin config -g cfgUserDomain -i 2 -o cfgUserDomainName admin.test.local\r\n\r\necho Make the DRACAdmin an Administrator\r\nracadm -r %dracIP% -u root -p calvin config -g cfgStandardSchema -i 1 -o cfgSSADRoleGroupName DRACAdmin\r\nracadm -r %dracIP% -u root -p calvin config -g cfgStandardSchema -i 1 -o cfgSSADRoleGroupDomain admin.test.local\r\nracadm -r %dracIP% -u root -p calvin config -g cfgStandardSchema -i 1 -o cfgSSADRoleGroupPrivilege 0x000001ff\r\n\r\necho Make the DRACUser an Operator\r\nracadm -r %dracIP% -u root -p calvin config -g cfgStandardSchema -i 2 -o cfgSSADRoleGroupName DRACUser\r\nracadm -r %dracIP% -u root -p calvin config -g cfgStandardSchema -i 2 -o cfgSSADRoleGroupDomain admin.test.local\r\nracadm -r %dracIP% -u root -p calvin config -g cfgStandardSchema -i 2 -o cfgSSADRoleGroupPrivilege 0x000001f3\r\n\r\nREM pause\r\necho Make\/update the local account\r\nracadm -r %dracIP% -u root -p calvin config -g cfgUserAdmin -i 3 -o cfgUserAdminUserName MyAdminUser\r\nracadm -r %dracIP% -u root -p calvin config -g cfgUserAdmin -i 3 -o cfgUserAdminPassword MyAdminP@ss\r\nracadm -r %dracIP% -u root -p calvin config -g cfgUserAdmin -i 3 -o cfgUserAdminEnable 1\r\nracadm -r %dracIP% -u root -p calvin config -g cfgUserAdmin -i 3 -o cfgUserAdminPrivilege 0x000001ff\r\nracadm -r %dracIP% -u root -p calvin config -g cfgUserAdmin -i 3 -o cfgUserAdminIpmiLanPrivilege 4\r\nracadm -r %dracIP% -u root -p calvin config -g cfgUserAdmin -i 3 -o cfgUserAdminIpmiSerialPrivilege 4\r\nracadm -r %dracIP% -u root -p calvin config -g cfgUserAdmin -i 3 -o cfgUserAdminSolEnable 0\r\n\r\n\r\nEcho Please verify settings and disable\/change password on root if everything is in order\r\nEcho Thanks!\r\npause\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Recently I had an opportunity to work with several new Dell PowerEdge R810 physical servers. I needed to remotely connect to the console of these servers and found out they were equipped with Integrated Dell Remote Access Controller 6 &#8211; &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/scripting\/scripted-dell-remote-access-controller-drac-configuration\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-308","post","type-post","status-publish","format-standard","hentry","category-scripting"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/308","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=308"}],"version-history":[{"count":15,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/308\/revisions"}],"predecessor-version":[{"id":323,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/308\/revisions\/323"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}