locked
Login script to update CNAME records based on the currently logged in user. RRS feed

  • Question

  • Hi Everyone,

    First time posting on Technet, hoping to get involved in the community a bit and lend a hand where possible!

    The Environment: 
    I work for a renewable energy company based out of Melbourne, Australia with approx. 150 seats in our Head Office. We run VMWARE infrastructure with a 2003 AD Domain, soon to be 2008R2. All the network services are hosted on Windows Server machines and all clients are now(finally!) Windows 7 SP1. The network is split over a number of VLANS for the different levels of our building and the 'management' network on which reside all the comms and server gear.

    My scenario is as follows:
    We have historically been manually adding CNAME records for our Client PCs according to the assigned user. This CNAME(username) just points to the A record of the PC. This simply allows me to find the IP address of John Doe's PC by pinging 'jdoe'. I am trying to keep the support experience as streamlined for the staff as possible.

    Now, hoping the above makes sense to everyone else.. here is my question:
    Is there a mechanism available(login script, 3rd Party app?) to automatically create/update DNS records based on the logging in user. So if John Doe 'jdoe' lends his PC to Paul Smith 'psmith' the CNAME will automatically reflect the fact that 'psmith' has logged on.
    The idea being that Paul can call the Service Desk and we can easily identify his IP without asking him to read out the asset tag/run ipconfig etc.

    I don't know if the CNAME solution is the best way to get the functionality I want but it's what was here when I started :) any suggestions would be immensely appreciated!

    Thankyou!

    Adam

     


    • Edited by Adam Roddick Wednesday, January 11, 2012 12:02 PM Clarification
    Wednesday, January 11, 2012 12:02 PM

Answers

All replies

  • If your current procedure works in W2K3 it may work in W2K8 R2 environment. Just make a pilot tests.

    1. Logon script will be the simplest. This is for logging, but you can addapt it for your task.

    echo %date%,%time%,%username%,logon,%computername% >> \\server\logon$\logons.csv

    The second part of the job will do the script containing dnscmd

    http://technet.microsoft.com/en-us/library/cc772069(WS.10).aspx

    2. There are tools like this one

    http://www.safetoland.com/LUSER/LUSER.pdf

    Regards

    Milos

     

    • Proposed as answer by zhen tan Friday, January 13, 2012 7:42 AM
    • Marked as answer by Adam Roddick Tuesday, January 17, 2012 8:10 AM
    Wednesday, January 11, 2012 12:59 PM
  • Hi Milos,

    Thankyou very much for your response, greatly appreciated.

    I think I may be able to piece together your first suggestion but that LUSER tool also looks like it will do what I want already. Brilliant!

    Thankyou again,

    Adam

    Tuesday, January 17, 2012 8:10 AM