Thursday, August 20, 2009

Fix SYSVOL replication problems

I have four domain controllers, three of which were working fine. The fourth, which happened to be the master of practically everything active directory, wouldn't replicate correctly to the other DCs. The main error I found in the event log was a JRNL_WRAP_ERROR, with some information regarding changing a registry key and performing a non-authoratative restore in order to get replication going again. Well, some further reading suggested against using the registry hack provided in the actual event record citing potential problems, and instead pointed me in the direction of a different registry hack involving a BurFlags registry key entry. Needless to say, I went ahead and used this second suggestion and now all my DCs are replicating correctly again.

You want to make sure you're using this registry hack only on the DC(s) that is reporting replication trouble. You don't need to use it on any other than the problem DC. Also, this will move everything in that DC's local copy of the SYSVOL volume to an Ntfrs_preexisting folder within the SYSVOL share on that machine since this method will repopulate the SYSVOL share from a second DC. Otherwise you would lose anything in the SYSVOL on the problematic DC, which may or may not be a problem. In my case I would've lost the changes I had made to group policy, which was led me to realizing the AD replication was screwed up.

Ok, here's how to fix your SYSVOL replication problem:

1. Log in to the domain controller that is having the replication problem
2. Open the command prompt and type net stop ntfrs, then press Enter. This will stop the file replication service
3. Now open the registry editor (Start->Run, then type regedit and click Ok)
4. Navigate to the following registry key: HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Services->NtFrs->Parameters->Backup/Restore->Process at Startup
5. In the "Process at Startup" section, you should see an entry for "BurFlags". Open the BurFlags setting and change the value to D2. If BurFlags is not there, you can add it (It's just a DWORD value) and set the value
6. Close the Registry Editor and go back to the command prompt
7. Use the command net start ntfrs and press Enter. This will start the file replication service and start the non-authoratative restore of your SYSVOL folder

After step 7 you can check your event log to make sure that there's an entry saying that the DC you're working on was added to the replication set. You should also be able to notice your SYSVOL share having replicated with a copy from one of the other DCs in your domain relatively shortly after restarting FRS.

The initial post that led me down the correct path can be found here. If you want more detailed info, check out MS KB 290762. There you'll find more information regarding verifying that this actually worked, and also they have steps for a full authoratative restore, along with other help for replication issues.

Friday, August 14, 2009

Using Ctrl Alt Del in a Remote Desktop session

I'm sure anyone who has used Microsoft's remote desktop at one time or another wishes they could use the Ctrl+Alt+Del command on the remote computer. Well, what most might not know is that you can. Ctrl+Alt+Del will always affect the local Windows machine. However, Ctrl+Alt+End will provide the same functionality within a remote desktop sessions, allowing you to bring up the task manager or access the panel that shows up when Ctrl+Alt+Del is normally pressed. You could bring up the task manager by right-clicking the taskbar too, but if the machine you're logged into is having problems with the explorer.exe process (which one of mine is doing right now), the Ctrl+Alt+End command is just the thing you've been looking for.

Monday, August 10, 2009

Remove or find iPhone backup information

If you want to get rid of the backup information for an iPhone it's pretty simple. Open iTunes, then go to Edit->Preferences..., then click on the Devices tab. There you should see all devices you have synchronized with iTunes, along with the date of the most recent backup. To remove a backed up device, simply click on it to select it and then click on the Delete Backup button.

If you're curious where iTunes stores the backup files, I have the location of those as well. You have to unhide hidden files and folders in order to get there though. Go to My Computer->Tools->Folder Options, and then go to View and select Show hidden files and folders. Now, the location depends on your OS.

Windows XP
C:\Documents and Settings\USERNAME\Application Data\Apple Computer\MobileSync\Backup

Windows Vista
C:\Users\USERNAME\AppData\Roaming\MobileSync\Backup

You will see a folder that looks like a bunch of random characters or a GUID. That refers to your iPhone.

Friday, August 7, 2009

Reset iPhone using Recovery Mode

If you run into problems with your iPhone not working with iTunes, you still may be able to reset your phone and get it working again. First off, this was written for Windows users. Recovery mode should work on Macs as well, but some of the other information listed will not be relevant. This process will only work if your computer still recognizes the phone when you plug it in. If not, then your issue needs to be addresses by Apple iPhone support. If you have pictures on your phone that you don't want to lose, you should be able to pull them off prior to resetting the phone. Look in My Computer and you should see an icon for your iPhone. Open it and navigate the folder structure to get to the pictures, then drag them to a folder somewhere on your computer and wait for them to finish copying before continuing.

To start your iPhone in recovery mode

1. Turn the iPhone off and make sure it is not plugged in to your computer
2. Hold down the Home button, which is the button on the front of the phone below the screen
3. Continue holding the Home button and plug the iPhone into your computer
4. Still continue holding the Home button down until iTunes says that it has found an iPhone in recovery mode. At this point you can release the Home button. You may have to manually open iTunes for it to tell you it found the phone
5. You should be able to click on Restore within iTunes, then follow the prompts to reset your iPhone to factory defaults and reinstall the iPhone OS

Be aware that this will delete anything on your phone. If you have it backed up, restoring that backup may just bring your original problem back, so I'd suggest starting the restored phone as a new phone in your iTunes account. If recovery mode is not enough, you could try using DFU mode, which would be the next step. I did have success in DFU mode that recovery mode did not fix. You can find out more about that by checking my other post.

I still wish there was a way to do a factory reset right on the phone without the need for a computer or iTunes. After installing the iPhone OS 3.0 on a few phones, I've noticed that a couple of them have had issues with iTunes, and one even required a complete replacement. Most showed no problems, but for the ones that did, not being able to work in iTunes really limited the amount of troubleshooting a person can try.

Wednesday, August 5, 2009

2GB worth of online backup space for FREE!

Dropbox is a relatively new application that you can get from https://www.getdropbox.com/. It is free to download and use for Windows, Mac, and Linux, but you may want to make sure your flavor of Linux is supported before assuming it is. The software itself provides automatic synchronization of a folder on your computer with the online server. You can install Dropbox on multiple computers, which then allows you to share those files between the machines and also maintain multiple backup sources for those files.

Some of the key features of Dropbox are:

You can also manage your files online through Dropbox's web interface
Photo galleries are created automatically, and can be shared with a simple URL string
Synchronization is automatic and fairly quick from my experiences
Easy to install and use

You get 2GB of storage free, and then have the option to pay for more if you'd like or try to refer friends for additional space (250MB per referral, to a maximum of 3GB for free). The cost is relatively inexpensive though, with 50GB of space costing $10/month.

My cousin had been using Dropbox on a Mac to transfer files back and forth to a Windows machine, and suggested the program to me because he really likes it. After looking into it and using it for a while, it's definitely a nice tool, and for most people the 2GB limit will probably be more than enough for your important files. Feel free to give it a try and let me know how it goes!

If you're just looking to send someone files that are too big to email, check out my other post about a free service called Sendspace.

Wednesday, July 22, 2009

Automate and schedule Microsoft Access macros

If you are running various Microsoft Access databases (haven't quite gotten to SQL yet...) which need to be updated, it's usually nice to be able to automate the updates. While there is no built-in scheduler within Access, you can call macros from the command line, which then means you can script macros through the use of a batch file.

1. Create a new text file with an extension of .bat. You can use save as, or unhide extensions to use the .bat extension
2. In that file, put the full path to the Access executable surrounded by quotes, which will be

Office 2007 - C:\Program Files\Microsoft Office\Office12\MSACCESS.exe
Office 2003 - C:\Program Files\Microsoft Office\Office11\MSACCESS.exe

depending on the version of Access you're using.
3. Now put a space, then add the full path to the Access file you want to automate surrounded by quotes, including the file name. For example, "C:\Access Files\MyDatabase.mdb"
4. Now add a space to the end of that, and add the /x switch, followed by a space, then put the macro name (no quotes needed).
5. Save your .bat file, making sure it stays in .bat format.
6. Go to Start->All Programs->Accessories->System Tools->Scheduled Tasks, and create a new task. When asked what you want to run, browse to your .bat file and select that. Choose the rest of the options according to whatever schedule you want to put the macro updater on

In the end you should have a single line in your batch script that looks something like

"C:\Program Files\Microsoft Office\Office11\MSACCESS.exe" "C:\Access Files\MyDatabase.mdb" /x AutoMacroName

That's it. You now have a fully automated macro on a schedule. There used to be a point in time where we had a user who would start a macro when they arrived in the morning, and then sometime in the afternoon they'd be able to use the updated database. That's very inefficient, and can be a huge waste of time. This automation process can be a great time saver and allow you to update information after-hours, rather than making someone do it manually and wait for the process to finish.

The next thing you might want to look into is adding an email notification to your automated process so you know whether or not it finished. To do that, check out my other post about adding email notifications to ntbackup. The process behind both are practically the same. If you're interesting in more scripting, do a quick search and you should find a few more articles on the site too.

For more command-line switches for Microsoft Access, check out KB 209207

Monday, July 13, 2009

lpadmin error when trying to print in OS X 10.5

This is a known issue in OS X 10.5.7, and Apple has a support article with the supposed workaround. Trying to login as the lpadmin fails, and I'm sure if you found this article you're frustrated with trying to figure out which password you should be using. The trick is to upgrade the lpadmin group to support GUID membership. To do that, you can use a terminal command while logged in as a local administrator.

1. Go to Applications->Utilities->Terminal
2. Enter the command dseditgroup -o edit -p -a admin -t group _lpadmin and then press Enter
3. You should get a response saying _lpadmin has been upgraded to support GUID membership.

Try printing now and it should be fine. To see the Apple support page, check article TS2754

PS - I have seen this only act as a temporary fix on a few Macs that I have setup to connect to Active Directory. I'm not sure why, so if you run across this and can explain why this works for some AD Macs but not all (as a permanent fix), please leave a comment. Thanks!

Thursday, July 9, 2009

Check which process is using which port in Windows

Ports are used all the time. Some are standardized (25 for SMTP), and others are dynamic. I ran into an issue setting up a TFTP server yesterday where it said it couldn't start because another process was already using the port, even though I couldn't think of any programs I had running that would have had it in use. I had to investigate, and being that it is simple, I thought I'd share the process. Also, matching ports to processes can help catch or track down spyware/malware, which typically uses some type of Internet connection.

1. Open a command prompt. You can do this by going to Start->Run, typing "cmd", and pressing OK
2. Use the command "netstat -a -n -o". This will list all active ports, along with the process id of the process that is using it. Find the port you want to check, then look at the PID listed for using that port. Remember the PID
3. Now use command "tasklist /FI "pid eq yourPID"", making sure to surround "pid eq yourPID" in quotes. This will filter (/FI) your tasklist results, and only show programs using the PID equal to yourPID. Make sure to substitute the numerical PID from step 2 in for the yourPID text in the command.
4. If you'd like to stop the process that you found, use the command "tskill yourPID" to terminate the process, remembering to substitute your process ID value in for the yourPID text.

You can also use Task Manager to track down the process once you have the PID if you would like. However, the PID column on the Processes tab is not displayed by default, so you will have to add that (go to the Processes tab, then to View->Select Columns...). You can then check and end the process with the more familiar GUI interface.

Tasklist is a very helpful tool. One additional use for tasklist is for tracking down programs that are using svchost.exe. If you're interested in that, check out my previous post.

Tuesday, July 7, 2009

Enable LACP on an HP Procurve switch

First off, make sure your switch supports LACP. Not all of them do. If yours doesn't, or at least doesn't out of the box, check to see if there are any firmware updates on HP's site that enable LACP support, which you can find at http://www.hp.com/rnd/software/switches.htm. You also want to make sure that the device you're connecting to the switch supports LACP too, but hopefully you've already done that since you're looking how to set it up.

Ok, to enable LACP (link aggregation control protocol) is pretty easy. You have to have admin access to your switch, and also access to the CLI (command line interface) which you can get through with a simple telnet session to your switch's IP address. There is dynamic LACP, which is more of an automated configuration, but it limits your LACP link to running in the default VLAN only. I believe you can just plug the Ethernet cables into your switch and it will automatically recognize LACP is setup, as long as it is already configured on the device you are connecting. If you have multiple VLANs and need LACP to run in a VLAN other than the default, the only option is to manually set up static LACP, which is what this post is going to cover.

1. Login to the CLI on your switch, which you can do by opening a telnet session to the switch's IP address
2. Enter the username and password when prompted
3. Use the command "config t" to get into the configuration terminal. You'll know this worked when you see (config) appended to the end of your device name.
4. Use the following command to create your LACP trunk of ports: "trunk 1-4 trk1 lacp" then press Enter. This will create a new LACP trunk using ports 1, 2, 3, and 4, and name it trk1. For trk1, you can use anything from trk1-trkX, where X is the last port number on your switch. You can substitute whichever ports you want to use to create your LACP trunk. If you just want to use trunking rather than LACP, simply replace LACP at the end with the word trunk
5. Use the command "show lacp" to check the settings. You should see columns for "LACP enabled", "LACP Partner", and "LACP status". Assuming you already have the device configured for LACP and plugged into your new LACP ports, those three columns should read "Active", "Yes", and "Success" respectively. If the first column says "Passive", go to step 5b. Otherwise skip right to step 6.
5b. Enable Active LACP mode on your trunk ports. To do this, make sure you're in config mode and then use the command "interface 1-4 lacp active", substituting the port numbers you used in your trunk in the command. The command above changes ports 1, 2, 3, and 4 to active LACP mode
6. Now you have to put your new LACP trunk into the correct VLAN. Let's say I want this trunk to be in VLAN 2. To do that, I'll use the command "vlan 2 untag trk1". Substitute the VLAN number and trunk number of the actual trunks you are going to be using
7. That's it. You should now have yourself a static LACP trunk on your HP Procurve switch, and it should be in the correct VLAN for you to start using.

If you want to remove a port from your trunk at some point, you can use "no trunk 1" which would remove port 1 from the trunk. You can use port ranges too, so "no trunk 1-4" would completely remove the trunk that was setup in the example.

For more information, check out the pdf instructions from HP here. To see the original post that pointed me in the correct direction, click here.

Monday, June 29, 2009

Start a Microsoft Office 2007 program in Safe Mode

This is really simple, and can help diagnose issues and problems you may be having with Microsoft Office products, such as Word, Excel, Powerpoint, and Outlook. In order to start the application in safe mode, simply hold down the Ctrl key when selecting it from the Start menu (Start->All Programs->Microsoft Office, then pick the icon of the program you want to open). You will be prompted asking if you want to start the application in safe mode, so assuming you do, select yes to continue.

Microsoft has this posted here