Andrea Beni's Weblog
fra tecnologia e fantascienza…How to configure sendmail with smart host – Ubuntu
For configuring sendmail for using SMART HOST on Ubuntu:
- Open your configuration file:
# vi /etc/mail/sendmail.mc
- Append or modify macro that read as follows:
define(`SMART_HOST’,`smtp.yourdomain.com’)
- Replace smtp.yourdomain.com with your smtp server address. If line contains word, dnl remove the dnl word.
- Regenerate a new sendmail.cf config file with m4 command:
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
- Restart sendmail service:
# /etc/init.d/sendmail restart
Re-sizing Virtual Disks
from “vShpere-land”:
There are several methods to re-sizing virtual disks listed below. If you want to shrink the disk in ESX3 then using VMmware Converter is the best way to do this, you can no longer use vmkfstools to shrink a disk in ESX3, you can also try using QpartEd to shrink a disk. With all these methods you should make a backup copy of your original vmdk file in case something goes wrong. Also make sure you shutdown the OS cleanly before restarting the VM (GpartEd will sometimes fail otherwise). Methods 1, 4 & 5 are essentially the same using Linux boot CD’s and either GpartEd or QpartEd.
You can also check out my articles I wrote on this that use the methods below:
- Using VMware Converter to resize virtual disk files (Pt. 1)
- Increasing virtual disk partition size using DISKPART or GpartEd (Pt. 2)
Method 1 – Using vmkfstools and GParted to extend a disk
- Download the GParted Live CD ISO and make it available so it can be mounted by the virtual machine’s CD-ROM
- Shutdown the virtual machine you want to resize
- Log into the ESX Server console via Putty
- Type “vmkfstools -X /vmfs/volumes/<volume name>/<VM directory name>/<virtual disk file name>” ie. /vmfs/volumes/Storage1/my_vm.vmdk. New disk size can be specified in kilo, mega or gigabytes and will be the total size of the new disk. So if you want to increase a virtual disk from 20GB to 24GB you would specify either 24000m or 24g
- Power on the Virtual Machine and make sure it boots properly, load Disk Management and you will see the new unallocated space
- Now to join the unallocated space to the primary partition, first shutdown the Virtual Machine
- Connect the Virtual Machine to the GParted ISO file and make sure you enable Connected at Power On
- Power on the Virtual Machine
- Press ESC at the Bios screen to get to the Boot Menu
- Select CD-ROM as the Boot device
- Gnome Partition Editor will load, press Enter at the boot screen
- At the Boot option screen select Manual Video Card and then select Done
- Select US English at the Language screen
- Select qwerty/us.map at the Keyboard screen
- Select Generic VESA Compatiable at the Video Driver screen
- Select 8 at the Display Depth screen
- Select 1024×768 at the Resolution screen
- Once the partition editor loads, click on /dev/sda1 in the partition list
- Click the Resize/Move button
- Click and drag the arrow to extend the size of the partition, make sure you do a resize (double arrow) and not a move (four way arrow) so you should 0 free space preceding and following and then click the Resize/Move button
- Next click the Apply button and then the operation will start, you can expand Details to see the progress, once completed click the Close button
- Click the power button in the bottom right corner, then select reboot
- Edit the VM and remove the ISO from the CD/ROM device (change to Client)
- When the server restarts it will do a Check Disk, let this complete, Windows will prompt for a reboot after you login
- Reboot and load Disk Management and your Primary Partion will be the new size without any unallocated space
Method 2 – Using VMware Converter to shrink or extend a disk
When you use Converter to copy a VM it will transfer the data to the destination server by one of two ways. If you do not change the disk size or increase the size of your original disks then it does a block level clone of the drive. If you reduce the size of your original disks it instead does a file level clone of the drive.
- Download Converter and install it on the VM that you want to resize the drives, reboot after the install completes
- Start Converter application, click the Import Machine button
- Click Next at the Welcome screen and then Next again at the Source screen
- Select ‘Physical Computer’ and click Next o Select “This Local Machine” and click Next
- At the Source Data screen select your volumes and change “Maintain Size” to “Type Size in GB” and enter your new disk size and click Next
- At the Destination screen click Next
- Select “Import this machine to a Vmware ESX Server or VirtualCenter virtual machine” and click Next
- At the Destination login screen, select your ESX/VC server and enter the login information and click Next
- At the Virtual Machine Name and Folder screen enter a new name for your VM and select a folder and click Next
- At the Host or Cluster screen select a host for your destination and click Next
- At the Datastore screen, select a datastore and click Next
- At the Networks screen, configure your NICs and click Next
- At the Customization screen, click Next
- Click Finish and the conversion will begin
- Once the Conversion is complete, edit the new VM settings and remove any extra hardware that Converter adds (USB/serial/parallel ports, etc.)
- Shutdown your original source VM and power on your new destination VM
- Make sure everything is functioning properly on the new VM and you can delete the original VM
Method 3 – Using vmkfstools and another Windows virtual machine to extend a disk
- Shutdown the virtual machine you want to resize
- Log into the ESX Server console via Putty
- Type ”vmkfstools -X /vmfs/volumes/<volume name>/<VM directory name>/<virtual disk file name>” ie. /vmfs/volumes/Storage1/my_vm.vmdk. New disk size can be specified in kilo, mega or gigabytes and will be the total size of the new disk. So if you want to increase a virtual disk from 20GB to 24GB you would specify either 24000m or 24g
- Shutdown the second helper virtual machine
- Edit the settings of the second VM and add the hard disk from the first VM
- Power on the second VM and load the Disk Management snap-in and verify that the disk from the first VM has un-allocated space on it
- Select Start, Run and enter diskpart.exe
- The command ‘list volume’ will show you all volumes.
- Select your volume based on the results of the list volume command, ie. ‘select volume 1′
- Type the command ‘extend’ to extend the volume
- Check the Disk Management snap-in again and the volume should be extended with a larger capacity
- Shutdown the second VM and remove (not delete) the disk from it
- Power on your first VM and the new space should be there and ready to use
Method 4 – Using vmkfstools and System Rescue CD to extend a disk
- Download the System Rescue ISO and make it available so it can be mounted by the virtual machine’s CD-ROM
- Shutdown the virtual machine you want to resize
- Log into the ESX Server console via Putty
- Type “vmkfstools -X /vmfs/volumes/<volume name>/<VM directory name>/<virtual disk file name>” ie. /vmfs/volumes/Storage1/my_vm.vmdk. New disk size can be specified in kilo, mega or gigabytes and will be the total size of the new disk. So if you want to increase a virtual disk from 20GB to 24GB you would specify either 24000m or 24g
- Power on the Virtual Machine and make sure it boots properly, load Disk Management and you will see the new unallocated space
- Now to join the unallocated space to the primary partition, first shutdown the Virtual Machine
- Connect the Virtual Machine to the System Rescue ISO file and make sure you enable Connected at Power On
- Power on the Virtual Machine
- Press ESC at the Bios screen to get to the Boot Menu
- Select CD-ROM as the Boot device
- Press Enter at the boot screen
- Press Enter after boot sequence is complete and then type ‘startx’
- Once X-windows loads, double-click the GpartEd icon (drive icon, 3rd down on the right hand side)
- Once the partition editor loads, click on /dev/sda1 in the partition list
- Click the Resize/Move button
- Click and drag the arrow to extend the size of the partition, make sure you do a resize (double arrow) and not a move (four way arrow) so you should 0 free space preceding and following and then click the Resize/Move button
- Next click the Apply button and then the operation will start, you can expand Details to see the progress, once completed click the Close button
- Click the power button in the bottom right corner, then select reboot
- Edit the VM and remove the ISO from the CD/ROM device (change to Client)
- When the server restarts it will do a Check Disk, let this complete, Windows will prompt for a reboot after you login
- Reboot and load Disk Management and your Primary Partion will be the new size without any unallocated space
Method 5 – Using Knoppix Live CD with QtPartEd to shrink a disk
- Download the Knoppix Live CD ISO and make it available so it can be mounted by the virtual machine’s CD-ROM
- Shutdown the virtual machine you want to resize
- Add a second virtual disk of the new smaller desired size to the VM you want to resize
- Connect the Virtual Machine to the Knoppix Live CD ISO file and make sure you enable Connected at Power On
- Power on the Virtual Machine
- Press ESC at the Bios screen to get to the Boot Menu
- Select CD-ROM as the Boot device
- Press Enter at the boot screen
- Click on the K Menu icon and then select System and then QTPartEd
- Select your original drive (usually sda) and click on the partition 1
- Select Operations from the top menu and then Resize, resize the drive so it is just less then the new drives (sdb) capacity
- Select File from the top menu and then Commit, click Yes at the warning window
- Once complete, select Cancel if you get a unmounted hard disk window and then OK at the Progress window
- Open a Konsole window and type “dd if=/dev/sda of=/dev/sdb” This copy will take a long time and will not show a status while it is running. Yyou will get an insufficient space error at the end of the copy, this is normal because the drive you’re copying from is bigger then the destination. But as long as the partition is smaller, everything will work
- Shutdown the VM and edit the VM settings, remove the original C: drive and change the SCSI ID of the new drive to match the old one (usually 0:0)
- Power on the VM and it will run a Chkdsk and you will be all set
Method 6 – Use Ghost or another 3rd party imaging product to shrink a disk
- Shutdown the virtual machine you want to resize
- Add a second virtual disk of the new smaller desired size to the VM you want to resize o Use Ghost to clone the first disks partition to your second virtual disk
- Once complete make sure the second virtual disk is ‘Active’
- Switch your disks by editing the virtual machine settings and switching the SCSI id’s (0:0 and 0:1)
- If the virtual machine boots OK and you verify that everything works then shutdown the VM and remove the larger disk and delete it
Velnerabilità di IIS
Microsoft ha pubblicato un bolletino nel quale ha confermato una vulnerabilità in IIS versione 5.0 e 6.0.
La vulnerabilità riguarda il servizio di FTP, che nel caso in cui sia configurato per l’accesso anonino e scrittura in almeno una cartella può portare qualche malintenzionato a far girare del codice “pericoloso”.
La vulnerabilità non riguarda le versioni di IIS superiori alla 6.0
Il bollettino può essere consultato a questo link.
Sharepoint: how to increase the site template size
The default size of site template in Sharepoint is 10MB. If you want to save site template that have more size you must increase the maximum size by command line using:
stsadm -o setproperty -pn max-template-document-size -pv 20000000
(20000000 = 20MB)
How tov enable SSH and FTP on ESXi
VMware ESXi ships with the ability to run SSH, but the feature is disabled by default and not supported. Even FTP is disabled so you cannot upload images to the server for installation.
To enable SSH and FTP, you have to access the console. Obviously it is not intended by VMware to access the console as you would do in a regular Linux system. But, as always, there is a little magic to accomplish the aim.
At the console of the VMware ESXi host, press ALT+F1 to access the console window. Enter the word unsupported in the console and then press Enter. You will not see the text you type in.
If you typed in unsupported correctly, you can enter the password for the root login. You should then see the prompt ~ #.
To enable SSH and/or FTP, edit /etc/inetd.conf and remove the comments on #SSH and #FTP. Save the file and restart the server or inetd process.
Now you can access the host via SSH and/or FTP.
Upgrade a Windows 7
Dal 26 giugno 2009 gli utenti che acquisteranno un computer con Windows Vista Home Premium, Windows Vista Business o Windows Vista Ultimate preinstallato, potranno beneficiare dell’aggiornamento gratuito all’analoga edizione di Windows 7 al solo costo delle spese di spedizione. Dal sito di Windows 7 Upgrade Option, sarà possibile prenotare la propria copia del sistema operativo per riceverlo poco dopo il lancio del prossimo 22 ottobre.
La promozione terminerà il 31 dicembre 2010, coinvolgendo di fatto anche i computer che nel corso del prossimo anno saranno invendita con il vecchio Windows Vista.
Install and configure SQL Server 2008 Express
SQL 2008 Express is available free from Microsoft. It is a replacement for MSDE and SQL 2005 which will perform much better than its predecessors. SQL 2008 has no workload throttling like MSDE does and it supports up to 2 CPUs and 2GB RAM, where MSDE only supports 1 CPU and 1GB RAM.
If you are using MSDE and are considering managing more clients than you currently are, or are having problems with your Deployment Server or Notification Server running slowly even after optimizing your configuration, you will want to install SQL Server 2008 instead of MSDE.
SQL 2008 Express supports servicing SQL over your network and so it can be used for Deployment Server and Notification Server as long as you don’t have enough clients that you will need more than 2GB RAM. However, network is not enabled by default, so there is some configuration required to get SQL Server 2008 Express to work correctly.
This article will guide you through the process of installing and configuring SQL Server 2008 Express so that you can use it with Deployment Server or Notification Server.
Download SQL Server 2008 Express
First, you will need to download SQL Server 2008 Express. You have two options to download. You can either download SQL Server 2008 Express without any management tools (61 MB) from http://go.microsoft.com/?linkid=9314315 or you can download SQL Server 2008 Express with management tools (219 MB) from http://go.microsoft.com/?linkid=9394725
I recommend installing “SQL Server 2008 Express with Tools”, it is worth the extra 150 MB to be able to troubleshoot your SQL Server if anything ever goes wrong.
Install SQL Server 2008 Express
SQL Server 2008 Express requires .NET Framework 3.5 SP1, if your server does not have .NET Framework 3.5 SP1 you will need to download .NET Framework 3.5 SP1 and install it on your server. You can download .NET Framework 3.5 SP1 from http://go.microsoft.com/fwlink/?LinkId=120550
SQL Server 2008 Express requires Windows Installer 4.5, if your server does not have Windows Installer 4.5 you will need to download Windows Installer 4.5 and install it on your server. You can download Windows Installer 4.5 from http://go.microsoft.com/fwlink/?LinkId=123422
SQL Server 2008 Express requires Windows PowerShell 1.0, if your server does not have Windows PowerShell 1.0 you will need to download Windows PowerShell 1.0 and install it on your server. You can download Windows PowerShell 1.0 from http://go.microsoft.com/fwlink/?LinkId=120552
When you are ready to install SQL 2008 Express, follow these steps:
- Run SQLEXPRWT_x86_ENU.EXE (or SQLEXPRWT_x64_ENU) to install SQL 2008 Express.
- At the “SQL Server Installation Center”, choose “System Configuration Checker” to make sure you are ready to install SQL 2008 Express
- When the “System Configuration Checker” has validated that you are ready to install SQL 2008 Express, return to the “SQL Server Installation Center” and click on Installation.
- Select “New SQL Server stand-alone installation or add features to an existing installation”
- A setup support check will run. Make sure there are no errors or warnings, press OK.
- The “SQL Server 2008″ Setup will now appear, on the Product Key page, click Next.
- Check the box “I accept the license terms” and click Next.
- Click “Install” to install the Setup Support Files.
- When the Setup Support Files install is complete, click Next.
- You will now be in the “Feature Selection” page. Select “Database Engine Services” and “Management Tools – Basic” and then click Next.
- In the “Instance Configuration” page, specify MSSQLSERVER in both the “Named instance” and “Instance ID” fields, this will force SQL Server 2008 Express to install as the Default instance. If you want to install as a named instance, specify a name other than MSSQLSERVER.
- Click Next twice.
- You will now be in the “Server Configuration” page. Change the SQL Server Database Engine’s Account Name to “NT AUTHORITY\SYSTEM” and SQL Server Browser’s Startup Type to Automatic, then click Next.
- On the Database Engine Configuration page, you can either leave it configured to use Windows Authentication Mode only or Mixed Mode (SQL Server authentication and Windows authentication). I usually enable Mixed Mode so that if for some reason my security gets messed up I always have a backdoor account (the SA account). If you choose Mixed Mode, you will need to enter and confirm a password for the SA account.
- Before you can continue, you will need to specify the group(s) that you want to have unrestricted access to SQL Server. Click “Add…” and select the group(s). I recommend that you at least add Administrators and the “Current User” (Service Account). When you are done here, click Next three times, and then click Install.
- When the installer completes, click Next and then Close.
Enable TCP/IP
Now that SQL 2008 Express is installed, we need to configure the Network options that are disabled by default.
- In the Start Menu, open Programs > Microsoft SQL Server 2008 > Configuration Tools > SQL Server Surface Area Configuration
- In the Surface Area Configuration utility, click the link “SQL Server Configuration Manager”
- Expand “SQL Server Network Configuration” and select Protocols.
- Enable TCP/IP. If you need Named Pipes, then you can enable them here as well.
- Close the SQL Server Configuration Manager.
Add Firewall Exceptions
If you have a software firewall installed on your server, you will need to add exceptions for the SQL Server and SQL Browser services. If you are using Windows Firewall, do the following:
- In your Control Panel, open the Windows Firewall applet.
- Go to the Exceptions tab.
- Click Add Program
- Browse to and select “C:\Program Files\Microsoft SQL Server\MSSQL.10\MSSQL\Binn\sqlservr.exe”
- Click OK.
- Click Add Program
- Browse to and select “C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe”
- Click OK and then click OK again.
If you are using a third-party software firewall, you will need to follow their instructions to add exceptions to sqlservr.exe and sqlbrowser.exe.
Restart the Services or Reboot the Server
When you have completed all of these steps, you will need to restart the SQL Server and SQL Browser services to complete the process. If you still have problems, you may need to restart your server.
Sharepoint Services 3.0 con Search Server
Trovandomi a lavorare su Sharepoint Services 3.0 per la creazione di una web application per la gestione di numerosi documenti ho avuto l’esigenza di dover rendere disponibile un servizio di ricerca estremamente efficace che potesse effettuare ricerche “approfondite” sui singoli item e documenti del sito.
Entrando nell’argomento “Search Server 2008″ (motore ideale per la ricerca), ho trovato la documentazione per l’upgrade dal motore di ricerca di Windows Sharepoint Service 3.0 a Search Server 2008. La difficoltà riscontrata nella creazione dell’ambiente è stata quella relativa a trovare le giuste caratteristiche necessarie per l’upgrade, che sono:
- Windows Sharepoint Services 3.0 SP1 (nel caso in cui si abbia la versione senza SP1 sarà richiesta all’utente l’installazione del service pack)
- La corretta versione del language sia per WSS 3.0 che per il Search Server
- SQL Server 2005 con SP2
Ad installazione avvenuta è possibile aggiungere alla web application una raccolta siti dal modello del Search, che consente all’utente una configurazione del servizio e caratteristiche avanzate pari a quelle di un ambiente MOSS.
L’articolo completo è consultabile qui.
Pesce d’Aprile 2009: attenti al virus!
(tratto da WinTricks.t)
Sono circa 15 milioni i computer con sistema operativo Ms Windows infetto dalla terza edizione del celebre worm conosciuto come Conficker, il cui debutto è previsto il primo d’aprile, giornata tradizionlmente dedicata agli scherzetti.
Al momento non si sa esattamente che cosa abbia in piano il worm, motivo che accresce ancora più i timori verso questa minaccia. Si suppone che i PC infetti verranno utilizzati per inviare spam, partecipare ad attacchi coordinati a siti internet o trafugare dati personali.
Nonostante le casi produttrici di antivirus cerchino di affievolire i rumors emersi sul web negli ultimi giorni non possiamo che consigliare di tenere aggiornato il proprio antivirus e scaricare la patch distribuita da Microsoft che fino al 23 ottobre è stata installata nei pc non infetti tramite Windows Update.
Download di Windows7
Dopo la pubblicazione della versione “beta 1″ di Windows 7, Microsoft è stata costretta a sospenderne il download a causa dell’enorme traffico generato sui propri server. Nel corso del fine settimana, la società di Redmond ha ripristinato la possibilità di scaricare la beta del nuovo sistema operativo riattivando questa pagina.
Per procedere al download, è sufficiente scorrere la pagina web quindi selezionare la versione d’interesse (a 32 o 64 bit) e la lingua (l’italiano non è disponibile). Requisito essenziale è l’attivazione (qualora non se ne possegga già uno) di un account Windows Live ID, utilizzabile – ad esempio – per accedere ai servizi Live di Microsoft.
Dopo aver operato il login, la procedura proporrà un “Product key” da utilizzare in fase d’installazione della beta di Windows 7 ed il link per avviare il download del prodotto. L’immagine .ISO che verrà prelevata pesa all’incirca 2,4 GB e deve essere necessariamente masterizzata, quindi, su un supporto DVD.
Nelle scorse ore Microsoft si è affrettata a rilasciare una patch a correzione di un problema rilevato in Windows 7 e che può danneggiare i file MP3 memorizzati sul sistema. La corruzione dei file MP3 può verificarsi, secondo quanto riportato, nel momento in cui l’utente provi ad editare i metadati attraverso Windows Media Player o la shell di Windows 7. Analogo problema può accadere qualora Windows Media Player sia configurato in modo tale da compilare automaticamente i campi dei metadati del file MP3 attingendo alle risorse disponibili in Rete. In questo caso, l’inizio del file MP3 viene danneggiato rendendolo di fatto non può riproducibile. La patch KB961367 è già disponibile in questa pagina.
Ricordiamo che il download della versione “beta 1″ di Windows 7 è limitato e resterà disponibile, presumibilmente, soltanto per alcuni giorni.




