Wednesday, December 3, 2014

How to SCP(Copy) a file from one host to another in LINUX

Simple way to secure copy from one linux system to another:


root@myhost: ~# scp -P 22 <filename> root@<ip address or hostname>:<full directory path of file to copy>

Hit enter

You should get prompted for password to remote system. Enter the password and wait until the file copies over.

Done.

Tuesday, August 5, 2014

vCenter 5.1 installation issues establishing ODBC connection



Problem: After successfully configuring SQL server 2008, installing vCenter single sign-on, I could not get thru installing vCenter server. I created the ODBC connection with the tests running successfully. Still during the vCenter install, I could not connect to a supporting database.

Realization: The SQL native client needed to be installed first...then recreate a new ODBC connection to the backend SQL database before proceeding with vCenter server installation.

Before you proceed with installing vCenter Server, you need to install SQL Native Client. This is located on the SQL ISO (the one you installed SQL Server on @ SQL VM). It can be found in folder 1033_enu_lp\x64\setup\x64and is called sqlncli.msi.

The installation is just a matter of Next, Next, Next, Finish

ODBC error when upgrading or installing vCenter 4 or later

Configured DSN is pointing to an unsupported ODBC driver error while upgrading to vCenter 4.0


One of the errors my customers repeatly complain about while upgrading to vCenter Server 4 or even when trying to install it from scratch is the following error:
“The DSN is pointing to an unsupported ODBC driver. Please re-configure your DSN to use one of the supported drivers.”
If you face this problem the first thing to do is to ensure that you are running a supported Database. Hint! Hint! SQL 2000 is no longer supported. If you are running SQL 2000 then you must upgrade to SQL 2005 or SQL 2008 before upgrading to vCenter Server 4.0
If you have a supported database & still got the error then you must download & install the Microsoft SQL Server Native Client for your particular platform. You can use this link to download Microsoft SQL Server Native Client. See the Image below to see what the download link look like:
choose the odbc version suitable for you
After installing the required Microsoft SQL Server Native Client you will have to create a new ODBC connection using the just installed Microsoft SQL Server Native client as per the image below.
create new ODBC connection using the new driver
After following the above steps, you will have to restart the installation of vCenter Server 4 using the newly created ODBC connection.
The above steps should get the error out of the way & get you started. I hope this help, & please leave your feedbacks & other steps you needed to resolved the problem in the comments area.
Source: http://www.virtualizationteam.com/server-virtualization/configured-dsn-is-pointing-to-an-unsupported-odbc-driver-error-while-upgrading-to-vcenter-4-0.html

Wednesday, July 23, 2014

Unable to contact IP driver. General failure.

For some reason I cannot ping my domain controller.(It runs on Windows 2008 r2)

Pinged the server ip for the server itself , got the below error

c:\>ping xx.xx.xx.xx
Unable to contact IP driver. General failure.
 Tried to ping the loop back ip
c:\>ping 127.0.0.1
Unable to contact IP driver. General failure.

After extensive Googling, here is a solution I found:

It appears the TCP/IP stack may be corrupt.

Logged into the server via admin account , turned off the UAC then taking the following steps to reinstall and reset TCP/IP heap to its original state:

 1)Run the cmd as administrator (operation requires elevation (Run as administrator).
2)Type  netsh int ip reset in the Command Prompt shell, and then press the Enter key.
3)Restart your computer.
 Eventually pleasedownload and update the network driver to the latest version. If you server is VM, then goahead and update you VM tools.

Monday, May 12, 2014

How to change the limit imposed on remote desktop connections for Windows Server version xxxx

To configure the number of simultaneous remote connections allowed for a connection
  1. On the RD Session Host server, open Remote Desktop Session Host Configuration. To open Remote Desktop Session Host Configuration, click Start, point to Administrative Tools, point to Remote Desktop Services, and then click Remote Desktop Session Host Configuration.
  2. Under Connections, right-click the name of the connection, and then click Properties.
  3. In the Properties dialog box for the connection, on the Network Adapter tab, click Maximum connections, enter the number of simultaneous remote connections that you want to allow for the connection, and then click OK.
    If the Maximum connections option is selected and dimmed, the Limit number of connections Group Policy setting has been enabled and has been applied to the RD Session Host server.
You can also set the maximum number of simultaneous connections allowed for an RD Session Host server by applying the Limit number of connections Group Policy setting. This Group Policy setting is located in Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections and can be configured by using either the Local Group Policy Editor or the Group Policy Management Console (GPMC). Note that the Group Policy setting will take precedence over the setting configured in Remote Desktop Session Host Configuration.

Thursday, April 24, 2014

Add BGInfo to logon (Option#2)

Once you have the settings configured for your tastes, save the template by going to the File menu and clicking Save As.
SaveTemplate
The corresponding template can be saved anywhere but I just choose to store mine locally in the same location as the application.
In order to make BGInfo refresh the system information, you can create a batch file that launches on login.  To do this, open Notepad and type the following: “[Path to BGInfo App]\bginfo.exe” “[Path to template]\[TemplateName].bgi” /TIMER:0 /accepteula
The /TIMER:0 option forces the application to launch with the timer set to 0 seconds so the application GUI used earlier to configure the template never displays to the user.
The /accepteula flag prevents the user agreement splash screen from displaying during the first launch.
Save the new notepad file as a batch script.  I choose to just store this file in the same location as the application and template.



Local Computer Policy-->User Configuration-->Windows Settings-->Scripts(Logon/Logoff)-->Logon
I personally place my BGInfo directory in Windows\System32\BGInfo.

Here is what the bat file looks like:
C:\windows\system32\bginfo\bginfo.exe /ic:\windows\system32\BGInfo\logon.bgi /timer:0

Wednesday, April 23, 2014

Install NFS services for Windows 2008

Installing Server for NFS Services

 
 
ServerManagerCmd -install File-Services FS-NFS-Services
 
 
 
Simple...that's all I wanted :) 

Monday, April 21, 2014

Renaming a Windows Domain the not so hard way

Choosing a name for your domain is an important decision which will have many technical repercussions on the topology of your network infrastructure. Still, choosing a domain name is largely a business decision that is influenced greatly by the organization structure and needs.
The problem is that there is almost nothing more variable than the business environment and its needs. For example an organization restructuring may mean renaming some sub domains and/or changing their hierarchy, while a change of the company name will defiantly force a domain name change (a frightening prospect for many Windows administrators).
I was put in such a situation where a company that I am working with as an IT consultant had grown from a small design company of 20 employees with the name of Untilled Studios to became a successful group of companies employing 150+ person with the name of Think Arabia. For a while I ignored the problem but their needs have also developed and they started to need an internal SharePoint site with the name of the new organization and sub-sites for the different companies. It became obvious that a domain rename was needed.
I found that the procedure is very simple and can be easily done. Although there is nothing terrifying about it, I strongly suggest that you do as I did and try it in a test environment. I’ve installed the following virtual machines:
Two Domain controllers (DC0 and DC1): One domain controller can do, but I wanted to match the production environment as closely as I can.
1 - Production Environment
2 - Production Environment
One member server and/or one member workstation: Actually I created two of each to see the effect on member machines that were powered off during the procedure and member machines that were powered on. However, it turned out that all four machines I created acted in the same exact way regardless of whether they were on or off while I was renaming the domain :)
3 - Production Environment
4 - Production Environment
And the key to the procedure is one domain member machine that is not a domain controller to perform almost all steps from. This can be a Windows 7 machine with Remote Server Administration Tool (RSAT) installed, but I prefer to use Windows 2008 R2 server since the rendom utility gets installed automatically as part of “Active Directory Domain Services” role. But make sure not to promote the machine to a domain controller as this machine should not be a domain controller.
5 - Production Environment
Step 0: Create a new DNS zone with the new domain. As new records will start being created in that zone as soon as we perform the rename.
Step 0 Create a new DNS zone
Step 0 Create a new DNS zone 2
Step 1: From the Control Station run the rendom /list command.
An xml file will be created that lists the current domain information, namely ForestDNSZones, DomainDNSZones and NetBios name.
Step 1 Run rendom
Step 2: Edit this file to replace all mention of the old domain with the new domain name. In this case I’ve replaced all occurrences of untitled.local with thinkarabia.net and all occurrences UNTITLED with THINKARABIA.
Step 2 Edit domain
You can verify the new configuration using the rendom /showforest command:
Step 2 Edit domain 2
Step 3: Now that we feel more confident, it is time to upload the modified xml to our domain controllers using the command rendom /upload.
Step 3 Upload the modified xml
Step 4: Is to verify the radiance of the domain controllers using Run rendom /prepare.
Here is where I 1st faced an unexpected issue. In my first attempt, both of my test domain controllers were not prepared, but worked fine after turning off the Windows firewall. When I repeated the procedure, only one of the domain controllers gave an error while the other did not have any issues although the firewall was on. When I did it in production I turned the firewall off on all DC just in case, and it went fine on the first attempt.
Step 4 Verify the radiance
Step 5: The grand moment has come when you do the transfer rendom /execute.
Step 5 Transfer rendom execute
All your domain controllers will start to reboot at the same time!!!
Step 6: In order to continue you need to make your control server (the one we have been working with so far) aware of the domain name change. For that you will need to reboot it twice. Otherwise it will continue to use credentials from the old domain and will no longer be able perform changes on the new domain. By the way, all member servers and workstations will need to be rebooted twice to reflect the change, but not yet :)
Normally at first, all your machines will suggest logging in using the old domain name. No need for alarm, it is just remembering what user name you’ve used last time you have logged in. You simply need to switch user and login with the new domain name.
Step 6 Make your control server Step 6 Make your control server 2
Step 7: Reflecting the domain name change on your Group Polices.
Group polices still reference the old domain names, and hence we need to fix it.
Step 7 Group Polices
This is easily performed using the following two commands:
gpfixup /olddns: untitled.local /newdns:thinkarabia.ent
gpfixup /oldnb:UNTITLED /newnb:THINKARABIA
Step 7 Group Polices 2
Step 8: Renaming the domain controllers themselves.
Unfortunately they do not get automatically renamed by rebooting twice; you will need to do it using the following commands:
netdom computername dc0.untitled.local /add:dc0.thinkarabia.net
netdom computername dc0.untitled.local /makeprimary:dc0.thinkarabia.net
Step 8 Renaming the domain controllers
Restart the domain controller, and repeat for the other domain controller.
Step 9: There is nothing else left to do on the control server except clean up using rendom /clean
And now you have a new name for your domain controller. But you need to reboot all your member machines twice for the change to take effect on all of them. It is a good idea to schedule the reboot before performing the procedure so that it happens automatically afterwards.
Note that this same procedure can be used to change the hierarchy of your sub domain in the forest. For example the sub domain it.servies.rj.com can be renamed to it.rj.com to reflect an organization restructuring.

This info was taken directly from here

Monday, April 14, 2014

Add BGinfo in login script in case you forget your computer info (Option#1)

Prepare the Background Wallpaper to apply via BgInfo:
You need to:

Remark: It is important that the location of output bitmap for BigInfo is a folder on which the user has Read / Write access. If this is not true, the bitmap wallpaper would not be generated. To change the location of the output bitmap, click on Bitmap > Location …. By default, User’s temporary files directory option is used – You can keep it as it is if you do not want to choose another location.



2.       Prepare a Logon Script to run BgInfo:
You can use the following script to run BgInfo:
reg add HKU\.DEFAULT\Software\Sysinternals\BGInfo /v EulaAccepted /t REG_DWORD /d 1 /f
\\Server\Share\Bginfo.exe \\Server\Share\template.bgi /TIMER:00 /nolicprompt
\\Server\Share\ is a shared folder on which you have the following files:
  • Bginfo.exe
  • Template.bgi: This is the BgInfo template your saved in the previous step
These commands can be saved in a .bat file.
3.       Apply BgInfo logon script using a Group Policy:
To apply BgInfo logon script using a Group Policy, proceed like the following:
  • Create a new GPO then go to User Configuration > Policies > Windows Settings > Scripts (Logon/Logoff) and then double-click on Logon

  • Select your BgInfo logon script and then click on OK

After that, you need to link your Group Policy to the Organizational Unit containing the administrative accounts on which it will be applied.

Taken directly from: http://social.technet.microsoft.com/wiki/contents/articles/20262.apply-bginfo-using-a-group-policy-logon-script.aspx

Wednesday, March 26, 2014

Vsphere, ESXi, and vCenter differences

This is a direct re-post from an article I read on mustbegeek.com, but it was a much needed reference in the event I had a brain fart and forgot these important differences between the VMware suites.

 Difference between vSphere, ESXi and vCenter

VMware Inc. is a software company that develops many suite of software products specially for providing various virtualization solutions. There are many cloud products, datacenter products,  desktop products and so on.
vSphere is a software suite that comes under data center product. vSphere is like Microsoft Office suite which has many software like MS Office, MS Excel, MS Access and so on. Like Microsoft Office, vSphere is also a software suite that has many software components like vCenter, ESXi, vSphere client and so on. So, the combination of all these software components is vSphere. vSphere is not a particular software that you can install and use, “it is just a package name which has other sub components”.
ESXi, vSphere client and vCenter are components of vSphere. ESXi server is the most important part of vSphere. ESXi is the virtualization server. It is type 1 hypervisor. All the virtual machines or Guest OS are installed on ESXi server. To install, manage and access those virtual servers which sit above of ESXi server, you will need other part of vSphere suit called vSphere client or vCenter. Now, vSphere client allows administrators to connect to ESXi servers and access or manage virtual machines. vSphere client is installed on the client machine (e.g. Administrator’s laptop). The vSphere client is used from client machine to connect to ESXi server and do management tasks. So now what is vCenter? Why we need it? Try cloning existing virtual machine using just a vSphere client without vCenter server.
vCenter server is similar to vSphere client but it’s a server with more power. vCenter server is installed on Windows Server or Linux Server. VMware vCenter server is a centralized management application that lets you manage virtual machines and ESXi hosts centrally. vSphere client is used to access vCenter Server and ultimately manage ESXi servers. vCenter server is compulsory for enterprises to have enterprise features like vMotion, VMware High Availability, VMware Update Manager and VMware Distributed Resource Scheduler (DRS). For example, you can easily clone existing virtual machine in vCenter server. So vCenter is another important part of vSphere package. You have to buy vCenter license separately.
Difference between vSphere, ESXi and vCenter
The diagram above shows vSphere suite in a more descriptive way. vSphere is a product suite, ESXi is a hypervisor installed on a physical machine. vSphere Client is installed on laptop or desktop PC and is used to access ESXi Server to install and manage virtual machines on ESXi server. vCenter server is installed as virtual machine on top of ESXi server. vCenter server is a vSphere component which is mostly used in large environment where there are many ESXi server and dozens of virtual machines. The vCenter server is also accessed by vSphere client for management purpose. So, vSphere client is used to access ESXi server directly in small environment. In larger environment, vSphere client is used again to access vCenter server which ultimately manages ESXi server.

Reference
http://www.mustbegeek.com/difference-between-vsphere-esxi-and-vcenter/

Wednesday, March 12, 2014

What happened to my VM networks(VLans)?

Okay...so I'm building a mass amount of VMs using Vmware ESXi 5.1 to construct a Windows domain with rogue systems to practice my uber hacking skills:) and something goes terribly wrong. I can no longer add my VMs to the VM networks that I created that are linked to VLANs on my Cisco switch. I did some reading and there is a setting on the Vswitch properties that can increase/decrease the amount of virtual ports per virtual switch. I had it set to only 120 ports...I have 500+ VMs. Okay, so I set the threshold to the max of 4088 to both of my virtual switches. Voila! My virtual switches disappeared. My VM networks all gone.

Based on this article, the issue occurred when the total number of ports exceeds 4608. It doesn't matter if you have one or several virtual switches configured. The number of total virtual ports cannot exceen 4608. B-I-N-G-O-!

I made the changes for each virtual switch(2) that I am using to have 504 ports each and rebooted the ESXi server. 

All is well in virtualization land. :)

Friday, February 7, 2014

Simple Exchange 2010 installation

Cut the bull crap. I have been through what seems like endless amounts of tutorials, blogs, and other instructional guides on a simple Exchange 2010 install for a small Windows domain environment(100 total systems/200 AD users). Why so many nonsensical/fluff included in these guides is beyond me.

Here is what worked for me:
  • Pre-reqs: 
    • Configure a Windows 2008 r2 domain controller and DNS server. (same system is fine)
    • Create a domain account that is part of the following groups: <Schema Admins, Domain admins, and Enterprise Admins>
      • Load the Exchange 2010 DVD and perform the three separate commands from command line on the DC itself since it also 'extends the AD schema'. Make sure you prepare AD first: 
        • Log in as a member of the schema admins domain security group. If there is an existing Exchange organization in place, run setup /prepareAD from the drive containing the Exchange 2010 installation DVD. If there is no existing Exchange organization in this environment, run setup /prepareAD /OrganizationName:”<the name of your new exchange organization>”. In the example below, the following command is used: setup /prepareAD /OrganizationName:”First Organization”.
        • Schema Updates (setup.com /pl, /ps and /p)
    • Build a separate Windows 2008 r2 server with all updates for you Exchange server
      • Load the Exchange 2010 DVD
      • From command line: Install the Exchange pre-reqs:
        • Run from this directory of the DVD: install\scripts>ServerManagerCMD -ip Exchange-Typical.xml
        • Reboot
        • Run the setup.exe file from Exchange DVD and complete installation.
  • Make sure you uncheck those two options in IE as was previously mentioned in an earlier post or you will not be able to open the Exchange MMC.
  • Then click on Exchange MMC and allow it to complete its initial setup.
  • Bingo bango! Finished.
*Now remember this is for a small business or lab environment. When you get into Exchange clusters Edge Transport servers yada yada yada, it will be more complex than this. If your objective is to have an Exchange mail server to work for your internal network, this is all you have to do.

Wednesday, February 5, 2014

Exchange 2010 mmc 'snap in not responding'

Turn off (Uncheck) “Check for publisher’s certificate revocation” & “Check for server certificate revocation” options on the server/workstations you are starting the EMC (Exchange Management Console) on
·        In Windows Internet Explorer –> Tools –> Internet Options –> Advanced tab
·        In the Security section, uncheck the below two options “Check for publisher’s certificate revocation” & “Check for server certificate revocation”


How does this relate to the EMC in Exchange 2010  ? well Exchange tries to connect to the certificate revocation list (CRL) Web site. Exchange examines the CRL list to verify the code signing certificate.

I have also noticed that unchecking the two options above speed up the start time of EMS (Exchange Management Shell)


Taken from: http://blogs.technet.com/b/nawar/archive/2011/06/03/exchange-2010-management-console-emc-is-very-slow.aspx

Thursday, January 30, 2014

Upgrade from a domain controller that is Windows 2008 SP2 to Windows 2008 r2

I had to do a 'simple' upgrade of a domain controller from SP2 to R2...easy right? Sure, if you know how.

Follow these steps:
  1. Make sure you are going from x64 to x64. If you are trying to go from 32-bit to 64-bit, no dice.
  2. Make sure you have plenty of space on the C partition. If you have less than 10gb(rough estimate), you need to extend the partition. That is a whole other conversation but get that done.
  3. From the R2 disk/iso, you need to run the following command(the path may be different from yours depending on if it's from a custom built R2 disk or not):
    • D:\support\adprep\adprep /forestprep
    • Press C and enter
  • Reboot the server
  • From the R2 disk, run the setup.exe file and go the 'upgrade' route. Accept the defaults
 Sounds simple until you do it. :)