Tuesday, December 6, 2011

Create an ISO on your MAC.

Mac OS X

From within Terminal (Applications->Utilities->Terminal)

You can find your CD/DVD drive using the following command:

drutil status

Vendor Product Rev
MATSHITA DVD-R UJ-825 DAM5

Type: CD-ROM Name: /dev/disk1
Cur Write: 16x CD Sessions: 1
Max Write: 16x CD Tracks: 3
Overwritable: 00:00:00 blocks: 0 / 0.00MB / 0.00MiB
Space Free: 00:00:00 blocks: 0 / 0.00MB / 0.00MiB
Space Used: 00:00:00 blocks: 0 / 0.00MB / 0.00MiB
Writability:

Now you will need to umount the disk with the following command:

diskutil unmountDisk disk1

Now you can write the ISO file with the dd utility:

dd if=/dev/disk1 of=file.iso

When finished you will want to remount the disk:

diskutil mountDisk disk1


You may also be able to use hdiutil create -srcdevice /dev/disk1 -format UDTO file.iso to create the ISO image. This works for data disks, but have not had much luck with audio CDs.

Reset Root password on an ESX server

To change the password for the root user, you must reboot the ESX host into service console only in single-user mode. To do this, follow the steps below appropriate for your version of ESX. This process does not apply to ESXi as it does not use GRUB.

ESX 3.xx and 4.xx
1. Reboot the ESX host.
2. When the GRUB screen appears, press the space bar to stop the server from automatically booting into VMware ESX.
3. Use the arrow keys to select Service Console only (troubleshooting mode).
4. Press the a key to modify the kernel arguments (boot options).
5. On the line presented, type a space followed by the word single.
6. Press Enter. The server continues to boot into single-user mode.
7. When presented with a bash prompt such as sh-2#, type the command passwd and press Enter.
8. Follow the prompts to set a new root user password.
9. When the password is changed successfully, reboot the host using the command reboot and allow VMware ESX to boot normally.

ESX Server 2.xx
1. Reboot the ESX Host.
2. When the LILO screen appears, press the space bar to stop the server from automatically booting into VMware ESX.
3. At the LILO prompt select linux, adding the -s to the end of the line. For example: linux -s.
4. Press Enter. The system begins to boot. The server continues to boot into single-user mode.
5. When presented with a bash prompt such as sh-2#, type the command passwd and press Enter.
6. Follow the prompts to set a new root user password.
7. When the password is changed successfully, reboot the host using the command reboot and allow VMware ESX to boot normally.

When the system is finished booting up, you can log in as the root user using the new password.

Monday, September 19, 2011

Rename a Windows 2008 Domain Controller

Rename a Window 2008 server Domain controler.

To accomplish this task you must be a member of the Domain Admins group.

To rename a DC with the name from server1 in mydomain.local domain to dc1 follow the steps below
1. Open Command Prompt in administrative mode and type the following:

NETDOM computername server1.mydomain.local /add:dc1.mydomain.local

This command will update the service principal name (SPN) attributes in Active Directory for this computer account, and register DNS resource records for the new computer name. The SPN value of the computer account must be replicated to all DCs for the domain, and the DNS resource records for the new computer name must be distributed to all the authoritative DNS servers for the domain name. If the updates and registrations have not occurred prior to removing the old computer name, then some clients may be unable to locate this computer using the new or old name. Therefore, it's very important to wait till the Active Directory replication finishes a replication cycle. You can check that by using tools such as REPADMIN and REPLMON.
You can verify the new name was indeed added to the computer object by viewing it through ADSIEDIT.MSC (which, for Windows Server 2008, is installed by default). Navigate to the computer object and right-click it. Select Properties:
Scroll down in the list of available attributes till you reach the attribute called msDS-AdditionalDnsHostName.
2. Ensure the computer account updates and DNS registrations are completed, then type:

NETDOM computername server1.mydomain.local /makeprimary:dc1.mydomain.local

You can insure the change with ADSIEDIT.MSC. Scroll down in the list of available attributes for the computer object untill you reach the attribute called msDS-AdditionalDnsHostName.
The old name should appear in the attribute's properties.
3. Restart the server.
4. Open Command Prompt in administrative mode and type the following:

NETDOM computername dc1.mydomain.local /remove:server1.mydomain.local

5. Make sure that the changes have successfully been replicated to all the DCs on your domain.

Wednesday, August 3, 2011

Active Directory Schema

There are times that you need to update your AD schema to the latest versions and times that you need to just know which you are running. So below are the commands to find your schema version for both AD and Exchange.

For Active Directory Schema version

"dsquery * cn=schema,cn=configuration,dc=domainname,dc=local -scope base -attr objectVersion"


For Exchange Schema version

"dsquery * CN=ms-Exch-Schema-Version-Pt,cn=schema,cn=configuration,dc=domain,dc=local -scope base -attr rangeUpper"

Here are the version numbers and with there respected meanings.

Schema Versions for Operating systems

13 - Windows 2000 Server
30 - Windows Server 2003 RTM, Windows 2003 With Service Pack 1, Windows 2003 With Service Pack 2
31 -Windows Server 2003 R2
44 - Windows Server 2008 RTM
47 - Windows Server 2008 R2


Schema version for Exchange

4397 -Exchange Server 2000 RTM
4406 -Exchange Server 2000 With Service Pack 3
6870 -Exchange Server 2003 RTM
6936 - Exchange Server 2003 With Service Pack 3
10628 - Exchange Server 2007
11116 - Exchange 2007 With Service Pack 1
14726 - Exchange 2010 With Service Pack 1