Unable to connect via RDP to a Server 2003 R2 server

I came across a problem today with a rather aged Server 2003 R2 server. I rebooted it as part of some troubleshooting, and after the reboot found I was unable to connect to the server via RDP. So, I jumped on the VM console to check various things, the Terminal Services service was started, but I did force a stop of this and start it again. Checked over the registry to ensure the listening port hadn’t been changed for any reason. Checked the terminal services configuration to ensure the connection wasn’t disabled and there were no strange limits imposed on the connection, but all looked normal. I did try disabling and re-enabling the connection, but still no luck. When I did a netstat -ao and looked for anything listening on 3389, there was nothing at all listening, no Terminal Services or any conflicting service was listening on port 3389.

In the end, after a bit of a search on Google and a bit of checking, one suggestion mentioned was to re-register the Terminal Services DLL. So using the following command regsvr32 remotepg.dll I tried this and the registration failed. Tried to un-register it first with regsvr32 /u remotepg.dll but again this failed. So, I came to the conclusion there might be a problem with the DLL. So, I copied the DLL from another working machine, un-registered and re-registered the DLL again, which succeeded this time round. Then after a reboot, I was hopeful, but still no joy. Final, checking the Terminal Services configuration again I noticed that now the connection was disabled, right clicking and going to All Tasks and enabling the connection, I was then able to connect via RDP. Success

WordPress Permalinks & mod_rewrite in lighttpd

After switching to lighttpd away from Apache I was pretty pleased with the whole process, everything seemed to be working fine, with the exception of my permalink structure. Bad news, however this can be fixed;

In your lighttpd.conf or 10-rewrite.conf enable mod_rewrite and paste the following code (you will obviously need to edit the $HTTP[“host”] portion):

$HTTP["host"] =~ "www.mark-gilbert.co.uk" {
url.rewrite-final = (
# Exclude common directories
"^/(wp-admin|wp-includes|wp-content)/(.*)" => "$0",
# Exclude root php files
"^/(.*.php)" => "$0",
# Handle permalinks and feeds
"^/(.*)$" => "/index.php/$1"
)
}

These three rules should cover every plugin and bit of functionality within the system. If you have other folders which you will need to access without any redirection (images in a separate folder etc), you have to add these names to the first rule, separated by the | characters.

Now go to Settings-> Permalinks, change Common Settings to Custom Structure and enter what you wish it to look like.

Basically, once mod_rewrite is enabled on the lighttpd server, which is done by adding the following line to the lighttpd.conf file;

server.modules += ("mod_rewrite")

This should work for you too.

OnePlus One SMS Message Centre Settings Location

Today I found I needed to check my SMS message centre settings on my OnePlus One, but wasn’t able to find the option anywhere in the standard settings.

The solution was to use the phone dialer, enter *#*#4636#*#* and then this takes you through to a testing information screen with various information menus. Under the “Phone Info” menu, down the bottom of the page, you should see the SMS Message Centre options, labelled “SMSC”.

From here you can update the settings and refresh them if you ever have any issues sending SMS messages. Obviously the specific number to enter will depend on your mobile operator.

Force Password Check With PDC When Login Failure Occurs

I didn’t even know this setting existed as an option within Group Policy, but then again, Group Policy is a bit of a beast at the best of times.

So, the PDC emulator is responsible in the domain for handling password replication to other domain controllers, a password change occurs on the PDC and this is then replicated out to all other domian controllers. But what if you have a large infrastructure and the password change hasn’t replicated out yet to the domain controller being used by a client to authenticate? Well there’s a policy setting you can apply to your domain controllers, that forces them to check with the PDC in the event they deny a logon request due to a bad password. The setting is called “Contact PDC on logon failure” and it is briefly detailed on TechNet, and within the Group Policy editor, lives at the below location;

Computer Configuration\Policies\Administrative Templates\System\NetLogon

Use with caution though, if used on domain controllers on slow WAN links, this will create a lot of traffic to the PDC, and in general it can create a lot of load on the PDC in large environments.