Skip to main content

Posts

How to send email from the Linux command line

MAIL First run a quick test to make sure the “sendmail” application is installed and working correctly. Execute the following command, replacing “you@youremailid.com” with your e-mail address. # mail -s “Hello ” you@youremailid.com Hit the return key and you will come to a new line. Enter the text “This is a test from my server”. Follow up the text by hitting the return key again. Then hit the key combination of Control+D to continue. The command prompt will ask you if you want to mark a copy of the mail to any other address, hit Control+D again. Check your mailbox. This command will send out a mail to the email id mentioned with the subject, “Hello”. # echo “This will go into the body of the mail.” mail -s “Hello ” you@youremailid.com And if you want mail to read the content from a file: # mail -s “Hello ” you@youremailid.com < /home/user/application.log Some other useful options in the mail command are: -s subject (The subject of the

iSCSI initiator configuration in RedHat Enterprise Linux 5

[root@rhel5 ~]# rpm -ivh /tmp/iscsi-initiator-utils-6.2.0.871-0.16.el5.x86_64.rpm Preparing... ########################################### [100%] 1:iscsi-initiator-utils ########################################### [100%] [root@rhel5 ~]# [root@rhel5 ~]#rpm -qa | grep iscsi iscsi-initiator-utils-6.2.0.871-0.16.el5 [root@rhel5 ~]# rpm -qi iscsi-initiator-utils-6.2.0.871-0.16.el5 Name : iscsi-initiator-utils Relocations: (not relocatable) Version : 6.2.0.871 Vendor: Red Hat, Inc. Release : 0.16.el5 Build Date: Tue 09 Mar 2010 09:16:29 PM CET Install Date: Wed 16 Feb 2011 11:34:03 AM CET Build Host: x86-005.build.bos.redhat.com Group : System Environment/Daemons Source RPM: iscsi-initiator-utils-6.2.0.871-0.16.el5.src.rpm Size : 1960412 License: GPL Signature : DSA/SHA1, Wed 10 Mar 2010 04:26:37 PM CET, Key ID 5326810137017186 Packager : Red Hat, Inc. <h

Configure a New Global Catalog

To configure a Windows 2000/2003 Domain Controller as a GC server, perform the following steps: Start the Microsoft Management Console (MMC) Active Directory Sites and Services Manager. (From the Start menu, select Programs, Administrative Tools, Active Directory Sites and Services Manager). Select the Sites branch. Select the site that owns the server, and expand the Servers branch. Select the server you want to configure. Right-click NTDS Settings, and select Properties. Select or clear the Global Catalog Server checkbox, which the Screen shows. Click Apply, OK. You must allow for the GC to replicate itself throughout the forest. This process might take anywhere between 10-15 minutes to even several days, all depending on your AD infrastructure.

Microsoft Hyper-V will not boot virtual SCSI devices

"Each IDE controller can have two devices. You can not boot from a SCSI controller. This means an IDE disk will be required. The boot disk will be IDE controller 0 Device 0. If you want a CDROM it will consume an IDE device slot." Source: MSDN Blog The hypervisor that runs the virtual BIOS does not support booting from a SCSI controller, today, but it does support the following boot devices: CD IDE Legacy Network Adapter Floppy The root reason is SCSI in a synthetic device and there is no VMBUS until after boot. One might think that this shouldn't be a problem, after all, the virtual machines can still boot from regular IDE-based virtual disks. So where's the catch? The main problem is related to the fact that in Virtual Server, virtual SCSI controllers have major performance benefits over virtual IDE controllers. In Virtual Server, it is recommended to attach the Virtual Disks to one or more SCSI controllers to improve disk input/output (I/O) per

Rename Windows Server 2008 Domain Controllers

The command In order to rename a DC you will need the NETDOM command. In Windows Server 2008, this is part of the operating system, and not a separate download as in previous versions. By using the NETDOM command, you ensure that there is little or no disturbance for the domain and client operations. Renaming a domain controller requires that you first provide a FQDN as a new computer name for the domain controller. All of the computer accounts for the domain controller must contain the updated SPN attribute and all the authoritative DNS servers for the domain name must contain the host (A) resource record for the new computer name. Both the old and new computer names are maintained until you remove the old computer name. This ensures that there will be no interruption in the ability of clients to locate or authenticate to the renamed domain controller, except when the domain controller is restarted. Important : To rename a domain controller using the NETDOM command, the domain

Installing the Virtual SCSI Controller Driver for Virtual Server 2005 on Windows Server 2008

You can install the virtual SCSI controller driver during the installation of the guest operating system by performing the following steps: Description and screenshots where made while installing Windows Server 2008 on Virtual Server 2005 R2 SP1, however the same instructions apply to the installation of Windows Vista. For Windows 2000/2003/XP you will need to press the F6 key during the text phase of the installation process, then press "S" to specify additional drivers, and then provide the driver floppy image. 1. Begin the installation by inserting the appropriate Windows Server 2008 installation media into your DVD drive. 2. Continue with the installation process, until you reach the point where you're prompted for the location of the system partition. Click on the Load Driver link. 3. Now you need to load the driver files as a virtual floppy image. The image's name is "SCSI Shunt Driver.vfd", and it is located in the C:\Program Files\Micros

Windows 2003 Domain Rename

This functionality is not available in Microsoft Windows 2000 Server family.  Microsoft Windows Server 2003 family provides the capability to rename domains in an Active Directory forest after the forest structure is in place. The structure of an Active Directory forest is the result of the order in which you create domains and the hierarchical names of those domains. Beginning with the forest root domain, all child domains derive their distinguished names and default DNS names from the forest root domain name. The same is true of every additional tree in the forest. The way to change the hierarchical structure of an existing domain tree is to rename the domains. For example, you can rename a child domain to have a different parent, or rename a child domain to be a new tree-root domain. In each case, you reposition an existing domain to create a different domain-tree structure. Alternatively, you can rename domains without affecting the structure. For example, if you ren

Setting Virtual Machine Boot Options in Windows 2008 Hyper-V

One of the problems with server virtualization is that when you virtualize your servers, you are essentially putting all of your eggs into one basket. Imagine for instance that a physical server that is hosting a number of virtual machines drops offline for whatever reason. None of the virtual machines hosted by that server will be available until the host operating system is rebooted, and all of the virtual servers are booted. Fortunately, there are some things that you can make the process of bringing everything back online a lot less painful. Automatic Start Action Even if your host operating system isn’t normally prone to failure, it’s worth taking a look at Hyper-V’s automatic startup options for virtual machines. It’s inevitable that you will eventually have to reboot your host operating system as a part of the match management process. When those reboots do occur, it’s nice not to have to manually boot every single virtual machine that’s hosted by that server individually.

How to Restore Windows Server 2003 Active Directory

There is an option to restore Active Directory objects that have been deleted and are now in a phase called "tombstone". You can use one of the three methods to restore Active Directory from backup media: Primary Restore, Normal Restore (i.e. Non Authoritative), and Authoritative Restore. Primary Restore: This method rebuilds the first domain controller in a domain when there is no other way to rebuild the domain. Perform a primary restore only when all the domain controllers in the domain are lost, and you want to rebuild the domain from the backup. Members of the Administrators group can perform the primary restore on local computer. On a domain controller, only members of the Domain Admins group can perform this restore. Normal Restore: This method reinstates the Active Directory data to the state before the backup, and then updates the data through the normal replication process. Perform a normal restore for a single domain controller to a previously kno

Expanding the Boot Volume of a Windows Server 2008 Virtual Machine

Expanding the Boot Volume To demonstrate how this works, I installed Windows Server 2008 as a virtual machine inside VMware ESXi 4.0. During the creation of the VM the boot partition size was set at 20 GB, which in Windows Server 2008 might just be a bit to small. To expand it, we need to expand the virtual disk first. This is a simple process, all it needs is a couple of mouse clicks and you're set. In the vSphere Client, right click the virtual machine and select Edit Settings Next, you need to find the virtual disk and edit it's size from 20 GB to 30 GB, or any other size you might want, click OK and let it weave it's magic. The disk should now be expanded, but Windows Server 2008 still doesn't recognize the new available space. This is where the Disk Manager enters the picture. Navigate the Start Menu and find Server Manager. Find the Storage node, expand it and select Disk Management Right click Disk Management and use either Refresh o