Archive for September, 2007
Posted by Vide on September 26, 2007
If you have to install postfix in a multi-IP environment, say, if you need it to listen to two or more IP (for example a real IP and an alias on the same NIC), there is a cute directive in main.cf that let you decide which IP should postfix (well, it’s parts like smtp, virtual/maildrop etc) use when contacting an external server.
inet_interfaces = 192.168.1.200, 192.168.1.201, localhost
smtp_bind_address = 192.168.1.201
with inet_interfaces your postfix will listen to these 3 IPs, and with smtp_bind_address you will tell postfix to specifically use 192.168.1.201 when contacting an external address.
Posted in FreeBSD, Linux, Postfix, Tips, Unix | Tagged: mail server, multi-homed, Postfix, Tips, virtual ip | Leave a Comment »
Posted by Vide on September 14, 2007
It seems that this blog is going to transform itself into a Windows-related blog, but that’s normal since Windows is so much more complicated to manage than Linux/FreeBSD… :P
Anyway, this is a neat feature if yours users start asking you “someone sent me a new Word 2007 (or Excel 2007) attachment and I cannot open it!”. The first answer should and it has to be: “talk to this person and tell him/her to save again the document in Word 2003 DOC format”, or “start using OpenOffice and true open standards and free use from this PITA!”. Then, you can go to download the Microsoft Office 2007 Compatibilty Pack (for Office 2003) exe file in your local language, save it to a temporary location and from cmd.exe issue
FileFormatConverters.exe /extract:C:\temp_dir
this trick will create in C:\temp_dir the .msi file you can use to deploy the package through a normal GPO software installation.
Posted in Office, Tips, Windows, Windows 2003 | 1 Comment »
Posted by Vide on September 14, 2007
Windows XP and Vista (and maybe 2000 too) by default have a DNS cache set with a 15 minutes expire time. That is, if you have made changes in your DNS server, a WinXP box will get this changes only after 15 minutes. If you want to change this, you have to add a key to the Windows Registry. Rant: add? ADD?!? why defaults have to be hardcoded and why a key doesn’t already exists with the default value in it? Rationals? Anyway, the path to the registry is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters
and you have to create a dword key here called NegativeCacheTime, and set its value to whateveer you want. 0 in case you want to disable this feature. Remember that the values is in second.
If you want to deploy this change, the quickest (and easiest) method I found was to create a registry file delete_dnscache.reg like this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters]
"NegativeCacheTime"=dword:0
(remember to change the final :0 with the seconds of cache you want.
and then create a simple batch (.bat) file to put in the Group Policy machine’s startup scripts with something like this:
regedit /s \\YOURSERVER\netlogon\delete_dnscache.reg
Then, give a gpupdate /force on your DC, reboot a WinXP machine and check its registry for the new parameter.
Posted in Active Directory, Tips, Windows, Windows 2003 | 3 Comments »
Posted by Vide on September 10, 2007
I’m going to start this list of tools that really help me improving my daily work with two (not so little) programs that really save you hours if you are administrating more then 10 machines. OCS Inventory and GLPI. These are two web-based programs (based on PHP+Apache+Mysql, so really easy to deploy) that can do almost all the dirty work of inventoring, organizing and managing your IT infrastructure.
OCS Inventory, with its agents, it’s the heart of the system: you have to install an agent on every machine you want to inventor (and you can do it with automated scripting even on Windows!) and this agent will recollect every bit of hardwar/software information on that computer and store it in OCS Invetory database. Now, firing up the web based interface, you can review all the data collected directly in OCS Inventory, although it’s a bit rough and not very user friendly. But the most important task of OCS inventory is not displaying data, but to collect it. Ihave inventored Windows XP, Windows Vista, every flavour of Linux, FreeBSD, OSX etc. And when you need to manage all this data…
…enter GLPI. GLPI is really thinked towards sysadmins/helpdesk which have to know everything about the hardware park they are managing. It sports a relatively simple user interface, a very very rich feature set and can “suck” all the data from OCS Inventory, in an automated form. GLPI is really amazing, if you are thinking about a feature you would need in this kind of programs, GLPI got it. Searches based on hardware data like MAC address? Got it. Software management so you can keep track in every moment of where you have put that particular Photoshop license? Got it. Contracts/warranties management, with integrated reminders? Got it.
You should definitely check these softwares out, they will make your life easier, granted!
Posted in FreeBSD, Linux, OSX, Tips, Windows | 2 Comments »
Posted by Vide on September 7, 2007
Maybe this is never going to be useful to anyone, but it may be an interesting read if you want to know that it can be done :)
This guide should work with both 32 and 64 bit installations of Windows Server 2003 R2, you simply have to download different versions of the files I link you (by default 32 bits). Interested? Let’s go on… Read the rest of this entry »
Posted in Howtos, Unix, Windows 2003 | Leave a Comment »
Posted by Vide on September 6, 2007
Today, after the last crazy behaviour of my old Firefox profile, I finally decided to migrate it to a new, clean one. Yeah, because when you are experiencing things like: not installable add-ons/extensions, permitted pop-ups not working and pages not refreshing correctly it’s time to change profile.
So, what do you have to do to create a new, better working profile without loosing all your precious informations (bookmarks, history and passwords)?
$ firefox -ProfileManager #create a new profile, leave it as default and close FF
$ cd ~/.mozilla/firefox
$ cp xxxx.oldprofile/bookmarks.html yyyy.newprofile # bookmarks
$ cp xxxx.oldprofile/history.dat yyyy.newprofile # pages history
$ cp xxxx.oldprofile/signons2.txt yyyy.newprofile # autocompletation in forms
$ cp xxxx.oldprofile/key3.db yyyy.newprofile # passwords!!
next, start again Firefox and that’s it! All your history, bookmarks and passwords are there, ad you have now a 100% working Firefox, again.
Note:you can apply this tip to Windows, OSX and all the other platforms supported by Firefox, as well
Posted in Firefox, Linux, OSX, Tips, Windows | 3 Comments »
Posted by Vide on September 4, 2007
If you need to work with dates in a shell script, this oneline could be useful:
echo $((`date +%s` - $OFFSET))|awk '{print strftime("%Y-%m-%d",$1)}'
What it does: it takes the current system time, converts it to epoch, rest $OFFSET (which should be in seconds) and then convert it again in the forma YYYY-MM-DD (but you can use every output supported by strftime, man strftime). Useful if you want to do some quick date calculation without having to fight with months, leap years and so on.
Posted in FreeBSD, Linux, OSX, Oneliner, Shell scripts | 1 Comment »
Posted by Vide on September 2, 2007
I know this is a super-FAQ, but for some strange reason I cannot remember how to do this every time I need it. So, here it goes:
Simply reboot your Mac with the desired CD into the drive, and press and hold down, while rebooting, the Option key, aka ALT, aka the button between Ctrl key and the Command Key (aka Apple Key). You can now choose to boot from the CD.That’s all.
Posted in Apple, Macintosh, Tips | 2 Comments »