Archive

Archive for the ‘How to’ Category

Dynamic DNS (DYDNS) – dme_update

February 8th, 2009 No comments

Dynamic DNS is a system that allows for a DNS entry, commonly internet facing to be updated in real-time. This enables a connection to be established to a Dynamic IP Address (generally issued by an ISP) via a DNS name.

One implementation of this is DME Update which uses a simple Perl script to get the current external IP address and forms a URL which is used to update the DNS provider DNS Made Easy

My use for this has been through my Buffalo TeraStation which runs a cut down version of Linux and has the DME Update script running as a cron job. This allows me to always be able reach it without remembering an IP address.

The implementation for this is relatively simply, the requirements are:

  • wget – A well known command line HTTP retrieval program
  • Perl installed (exact version and pm files are unknown)
  • The dme_update script and config files which are here

First of all edit the config.pl file and set the $nic variable to the name of the network interface that should be doing the lookup, also set the $getip_ext variable to either 0 to use the IP address of the NIC, or 1 to use the external webpage quoted.

The next stage is to provide the DNS record details that need to be updated on DNS Made Easy, this should be placed in the records folder in a file with the following information

username
password
DNS Made Easy record ID
current record IP address

An example is:

myUsername
myPassword
1234567
22.22.22.1

To update the DNS record run the following:

perl /etc/cron.d/dyDNS/dme_update -r myRecordFile

I’m sure there are many more implementations avaliable and for many different DNS providers, however this appealed to me due to the simplicity. The end result from the Perl scirpt is a formatted URL which either updates the DNS entry if required, or does nothing. Example URL is:

http://www.dnsmadeeasy.com/servlet/updateip?username=myUsername&password=myPassword&id=1234567&ip=22.22.22.2

Categories: How to Tags: , , ,

Additional AD User Account Information

February 8th, 2009 No comments

There is a lot of information that Active Directory stores in its database that is not necessarily available through common tools such as Active Directory Users and Computers MMC.

With the Active Directory Users and Computers MMC installed, and by using part of Microsoft’s Account Lockout and Management Tool, extra user account information can be made accessible, this includes:

  • Password last set time
  • Password expiry time
  • SID and GUID
  • Last Logon \ Logoff \ Bad Password time
  • Logon \ Bad Password count

NB: The last logon and logoff attributes within a Windows 2000 domain are not replicated between domain controllers… therefore not accurate. However this has been fixed with AD 2003 by adding another attribute into the schema called lastLogonTimestamp which is replicated.

The first step is to get the acctinfo.dll available from the above tool or here.

Next, copy the file to C:\WINDOWS\SYSTEM32 then run the command

regsvr32 C:\WINDOWS\SYSTEM32\acctinfo.dll

This will register the dll, when opening the Users and Computers console you will notice another tab called Additional Account Info. This is where the extra information is displayed.

Categories: How to Tags: , ,