Delegate control to disable/enable user accounts

DelegateI have a user I want to be able to disable or enable other domain user accounts without giving that user to much permissions. I spent some time Googling and on Microsoft’s support site and couldn’t find a specific permission that allowed just that. I found one that allows you to delegate the ability to unlock a user account. After playing with this for a couple of hours I grew to appreciate the complexity and power Active Directory gives an administrator over a domain. What I finally ended up using was a permission that allows for the user to enable/disable as well as change anything in the account options window on the Account tab. A bit more than I wanted to give, but not a problem in my case.

Right-click your domain and select delegate control. The delegate control wizard starts, click next to begin. Next select the users or groups that you want to delegate the responsibility to. In my case I have a group called “DisableEnableUsers” that I want to give the ability to disable/enable user accounts.

Next select create custom task to delegate radio button and hit next. On the “Delegate control of:” dialog select “Only the following objects” and scroll down to “User Objects” hit next. Put a check in the “General” box on the “Show these permissions:” window. Scroll down to the “Read and Write Account Restrictions.” Hit next and finish.

Now the users and or groups you delegated control to “Read and Write Account Restrictions” will be able to disable or enable user accounts.

Cleanly shrink transaction log on a SQL Server database

SQL ServerSQLServerOne of our database’s transaction log had grown to over 5gig. Considering the actual size of the database itself and the amount of activity this is huge. Plus it slows down our back-ups and just generally bugs me.

So, first I’ll tell you how not to try and clean it up. Don’t goto the Enterprise manager and right click on the database and select “Take Offline.” The next thing you don’t want to do is go and delete the transaction log file now that the database is offline. This sounds like a good idea and yet it’s not. When you goto bring the database back online it will kick and scream and throw fits and generally not work. Plus if the transaction log is large like say 5gig, it’s too big to send to the recycle bin and it gets permanently deleted.

The way you should shrink the size of the transaction logs is this:
a) Detach the database using sp_detach_db procedure (before that ensure no processes are using the database files.) Open query analyzer and type: “sp_detach_db ‘DB Name'” then execute query.
b) Delete the log file. (I feel more safe simply renaming it before deleting it.)
c) Attach the database again using sp_attach_db procedure.
This will tell the database server that the database was closed cleanly and it will proceed to create a new transaction log.

Update 10/03/06: We’ve since switched to using the following command to shrink our transaction log:

backup log “databasename” with Truncate_only
DBCC SHRINKFILE (‘databasename_log’,truncateonly)

It’s been pointed out to us that detaching the database is not a safe way to shrink your transaction log. We stand corrected! :)

Add record count to Frontpage Database Results

Frontpage DRWI’m not a huge Frontpage fan for the most part, but when it comes to creating ASP pages with database results it does do a good job. There are some things that it lacks, but overall you can get a nicely formatted report that is easily distributable through an intranet.

One of the things I had thought when working on past ASP pages is the lack of a record count. After some poking around the newsgroups (gotta love Usenet!) I found some pieces of code that I finally tweaked and experimented with enough to add a record count to an ASP page containing Frontpage Database Results.

The main piece that generates the count is this:

Now, the placement of this little bit of code is key. You need to switch to code or split view so you can past this into the actual HTML. It needs to be within the database results region. If you place it in certain places on the page, Frontpage, being the clever helper, will simply remove it. If you place it to high in the results region you will get a count but it will be off by one. The reason for this is because it’ll start with 0 as the first record. So, it really needs to be at the end of the results region.

After playing around a bit I found it works best just below the table holding the database results. I added the following:

 
Records: < %=fp_iCount%>

DBEnd

Remove Nero Scout from Windows Explorer

Nero ScoutI’ve used Nero almost exclusively for burning for several years now. I recently purchased the latest version and installed the whole thing. It now comes with a bunch of applications 90% of which I care nothing about. One new annoyance, in my opinion, is something called Nero Scout.

Truthfully I don’t even know what it is. It looked like something for finding and cataloging media files. I have my ways and methods and don’t need a new tool for this. It puts an annoying icon in my Windows Explorer that I don’t want there. I’m very particular about my computers and I don’t want anything extra floating around anywhere. So I figured it must have been installed with all the extra junk and it must go away if I remove all of the Nero applications except the actual burning part. Wrong. It was still there after un-installing all the rest. So after some poking around the web I found the following commands to remove the little pest. Goto Start/Run and execute one of these. It simply un-registers the dll associated with Nero Scout.

Remove Nero Scout:
regsvr32 /u “%commonprogramfiles%\Ahead\Lib\MediaLibraryNSE.dll”

Put it back:
regsvr32 “%commonprogramfiles%\Ahead\Lib\MediaLibraryNSE.dll”

Thanks to DjLizard.net for the info

Protected Content with Media Center

media-center-edition-logo-2.jpgDRM keeps poking up it’s ugly head, and it’s really beginning to irk me. I mainly use Windows Media Center to record HBO movies. I had about 9 or so recorded, and today I’m sick, so I thought it would be a perfect time to watch some of them, but what do you know, none of them work. I tried my main PC running Media Center, and the Media Center Extender in the front room. Both give an an error saying it’s protected content and won’t let me watch any of them!

I read about people running into issues after installing Update Rollup 2 for Media Center 2005, because Rollup 2 installs an updated Digital Rights Management (DRM) package. I’ve had the Rollup 2 installed for months with no problems, and now all of a sudden I’m getting this protected content crap!

I found this statement on Microsoft’s website. The Microsoft Windows Media Digital Rights Management (DRM) system may not work if you make changes to your computer hardware.

So basically if certain components are changed in your PC, like I changed out a hard drive, Windows Media DRM may not work because it views the change as an unauthorized attempt to move protected content to another computer. Crap like this makes me want to pirate everything, and not purchase anything legally anymore. I’m paying for HBO, and I can’t even record it! Ahhh.

So for the others who may run into this problem, here’s the fix, courtesy of Aaron Stebner. Be sure to back up any licenses to protected content first, and then perform the following steps:

  1. Close Media Center and Windows Media Player.
  2. Click Start, Run. In the Open box, type cmd and click OK to open a Command Prompt window. At the command prompt, enter the command net stop ehrecvr and press Enter.
  3. Click Start, Run. In the Open box, type %allusersprofile%\drm and Press Enter.
  4. In the Windows Explorer window for the DRM folder, choose Tools, Folder Options. Click the View tab and select the Show hidden files and folders option and then clear the Hide protected operating system files option. Click OK to close the Folder Options dialog box.
  5. Click in the Windows Explorer window for the DRM folder, press Ctrl+A to select all files, and press Delete.
  6. Optional: Reverse the settings in Step 4.
  7. Visit the following Web page: http://go.microsoft.com/FWLink?LinkID=34506 and click the button that allows you to upgrade Windows DRM components.
  8. Restart your computer.
  9. Optional: Restore any backed-up licenses.

Taskpad view in Windows Server MMC

taskpadOk, if you are a long time Windows Server administrator and already know about taskpad view in the Windows MMC you might skip reading this, or at least refrain from making fun of me for not knowing about this sooner. I just found this feature today, so it’s totally new to me and really cool. I’m not sure how many versions back this has been in, but I’m running Windows Server 2003.

It all started because I wanted to find an easy way to let specific users unlock domain accounts easily. I found this article on Microsoft’s support site about delegating the ability to unlock accounts to a group or user. Then I found some scripts for unlocking domain accounts. On one of the sites I was on they talked about adding the scripts to the taskpad view.

What on earth is the taskpad view was my first question. So I went back to the MMC and started poking around. I had long ago found the usefullness of setting up a custom MMC control panel and had added the Active Directory Users and Computers, DHCP, Exchange and other snap-ins. If you aren’t familiar with this, you first need to have the Server Admin pak installed. The Windows Server 2003 admin pak can be found here. It can be used to manage Windows 2000 or 2003 servers. If you want to do the exchange functions you need to install the exchange management console from the Exchange installation CD. Then you can goto Start/Run and type MMC. You’ll get an empty MMC console. Goto File/Add Remove Snap-in where you can add the various snap-ins. You can add a ton of useful tools here ranging from Active Directory Users and Computers to SQL Server Enterprise Manager to DNS to DHCP. You name a Microsoft Server function and you can add a snap-in for it.
You can save this custom MMC and make a shortcut to it for whenever you need these functions. Now, for the part I just discovered. Once you have a snap-in in the MMC you can then goto Action/New Taskpad View. This will add a blank area where you can add shortcuts to specific tasks like Create New User, Find etc. See the above screenshot where I’ve added several tasks. These tasks allow you to add the standard menu options or you can also add scripts and executables. This is where I added scripts to unlock users or enable and disable user accounts. The cool thing about these tasks is that you can add parameters that get fed to the scripts. For instance I can click on a user in the right pane then click unlock users and the username of the user I have selected can be fed to a VBScript that unlocks users.

I used the instructions from this article to create my unlock, enable and disable user account tasks. I had to do some tweaking of the instructions but with some playing and testing you can come up with the right scripts. Here are the three scripts I ended up with, you need to edit each of them replacing the text that says “your domain here” with your domain. There are an unlimited amount of tasks you can add to these views and you can put your most used tasks where you can get to them quickly.

Turn off prompts for install of Microsoft Desktop Search in Outlook 2007

OutlookI downloaded Microsoft Office 2007 beta 2 and have to say it’s great so far. One thing that was kind of annoying is that everytime you open Outlook 2007 it prompts you to download an update to Microsoft’s Desktop Search. I tried that and with the version it wants you to install I kept getting an access denied message. So, after some playing and watching the install I found that the access denied message is related to registry keys that the installation package is trying to update that for some reason are not accessable. I tweaked the permissions on several registry keys and was able to finally get the install to work. After the install went through though the desktop search seemed to disappear.

Finally I decided to uninstall the desktop search and figured I’d just deal with the prompt to install it. After some poking around I found a place in the options to turn off that prompt. Goto Tools/Options/Other tab/Advanced Options and uncheck “Prompt to install Desktop Search.”

Maybe once the Desktop Search goes from 3.0 beta to stable release this will work better and I may go ahead and install it again. For now, I don’t really do that much searching of my desktop.

Dell Axim x51v problems

aximEver since I’ve had the Axim x51v I’ve had a couple of issues that have irritated me.

Firstly the device would mysteriously lose either the SD or CF slot altogether. Sometimes it would lose both. After a reset they would return.

Secondly, sometimes the device just would not turn on. Even though the battery had plenty of charge.

Thirdly, the battery would periodically drain itself dead after being off for a day or two.

Apart from these issues I’ve been extremely pleased with this handheld and it’s easily the best out of the many Pocket PC and Palm handhelds. The battery life is good, the screen is great, the BlueTooth and Wife work great. I love that it has both a SD slot and a CF slot. The shape and design are great and the device itself is solidly built.

So, needless to say I was estatic when I found this posting on Aximsite.com. Each of the above issues and a couple of others are said to be fixed by their little work-around. Apparently all of these issues are caused by the Activesync application on the handheld attempting to do a sync even though it’s not on the dock. Basically the fix is setting up an exchange server link and changing the sync timing to manual. If you actually do use an exchange server link to update your info on the pocket pc then you have to change the sync frequency to manual. The only downside to this is you have to trigger the sync on your own, which I actually prefer myself.

I made the change 2 days ago and I haven’t lost my SD nor CF card yet and the battery is still showing full charge. It’ll take another week or so to see if this really has fixed the above problems.

Google Sitemaps for WordPress and Pixelpost

googleI’ve been doing research lately on increasing traffic and search engine results to my various websites. One thing I ran across from Google is called Sitemaps.

From Google’s website “Google Sitemaps is an easy (and free) way to submit all your URLs to Google and help improve their visibility in our search results.” Sounds good, so I started trying to figure out how to make a sitemap. Well, it turns out that the site maps are a form of XML and Google’s instructions talk about downloading some files and running some scripts from Python (which I have no clue about and wouldn’t know where to start.) I use WordPress for my blog and a couple of other sites I manage and I use Pixelpost for my Photoblog. So after some more looking I found that there are some plug-ins for WordPress and addons for Pixelpost.

The WordPress Plugin was created by Arne Brachhold and is located here.

I found the Pixelpost addon here.

I have no idea if doing this will really help with Google visibility, but it was fairly easy to implement and doesn’t require ongoing maintenance. We’ll see I guess.

Update: (05/13/2006) I ran across a plug-in for WordPress concerning meta tags. From what I understand most search engines ignore these tags, but there are some out there that pickup on meta tags. The plugin can be found here at Project Arcanum. As with the Google sitemaps, I’m not sure if adding meta tags will make any difference.

ISA Server 2004 and FTP Access denied

denideWe’ve had Microsoft ISA Server running for a couple of weeks and ever since we upgraded to the new version we haven’t been able to write new files or delete existing files from an FTP connection.

The wierd thing is that we could make a FTP connection and download anything we wanted. We checked the permissions first because that’s what it really seemed like. However, we could make a FTP connection on a computer that wasn’t behind the ISA Server and delete to our heart’s content, so we knew it had to be something to do with the proxy server/firewall.

After some research on the web and some trial and error I finally figured it out. By default ISA Server 2004 restricts FTP traffic to read only. To change this you need to configure the FTP filter that allows the FTP traffic. For our setup the rule that allows the FTP traffic is called “Unrestricted Internet” rule, right-click and select Configure FTP. You’ll get the “Configures STP protocol policy” dialog bog and you’ll notice that the Read Only is checked. Remove the check box and hit ok. Then you’ll have to hit apply to save changes to the configuration.

After that make sure you disconnect your FTP session and reconnect since the new configuration has been applied. Once you re-connect you’ll be able to upload and delete all the files you want!

config