Archive for the ‘troubleshooting’ Category

Find Mac From IP

Wednesday, September 1st, 2010

Today I wrote a little script that will find the MAC address of a given IP that is on the same LAN.

The script pings the IP, then it checks the ARP cache to find the MAC. Pretty simple, yet very useful.

Download FindMacFromIP.vbs

Usage: cscript findmacfromip.vbs ‘IP Address’

Find Operations Masters in Active Directory

Tuesday, June 1st, 2010

EDIT: I have found a much easier way to list the FSMO Roles holders.
From a command line on any domain controller, Type netdom query FSMO

Thanks to Microsoft, I have an easy solution to finding the FSMO Roles holders in a domain.

To ouput all the FSMO Role holders of a domian:

Download the file dumpfsmos.zip, extract the file, and run dumpfsmos.bat from the command line with a single argument of a domain controller.

dumpfsmos.bat MyDC01

To change any of the Operations Masters Follow these instructions.

Change Operations Masters in Active Directory

Tuesday, June 1st, 2010

Each FSMO Role has a diferent procedure to change the owner:

RID, PDC, and Infrastructure Roles:

From the computer that you want to make the new FSMO Role holder:

  • Open Active Directory Users and Computers MMC

  • Right-Click on the Domain Name
  • Select ‘Operations Masters…’
  • Select the tab that you would like to change
  • Click the ‘Change’ button
  • Verify that you want to change the FSMO Holder by clicking ‘Yes’

    Domain Naming Role:

    From the computer that you want to make the new FSMO Role holder:

    • Open Active Directory Domains and Trusts MMC

    • Right-Click on the Domain Name
    • Select ‘Operations Master…’
    • Click the ‘Change’ button
    • Verify that you want to change the FSMO Holder by clicking ‘Yes’

      Schema Master Role:

      From the computer that you want to make the new FSMO Role holder:

      • Open the start menu and click ‘Run’

      • Type ‘mmc’ and click ‘ok’
      • Click File -> Add/Remove Snap-in
      • Click ‘Add’, select ‘Active Directory Schema’*, and click ‘Add’
      • Click ‘Close’, then ‘Ok’
      • Left-Click, then Right-Click on ‘Active Directory Schema’
      • Select ‘Operations Master…’
      • Click the ‘Change’ button
      • Verify that you want to change the FSMO Holder by clicking ‘Yes’

      * if you do not see ‘Active Directory Schema’ in the list, you need to register schmmgmt.dll. To do this, run regsvr32 schmmgmt.dll at a command line, then re-open the ‘Add/Remove Snap-in’ menu.

      To view what Domain Controller holds which FSMO Roles, see this post.

Telnet to test SMTP

Sunday, March 7th, 2010

Since I wrote up testing pop3 with telnet, I thought I would also wirte how to test SMTP with telnet.

From a command line in windows:

telnet

open IPofSmtpServer 25

220 mail.server.domain Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at . . . .

ehlo test.com

(test.com is the FROM domain)

250 OK

mail from:me@myDomain.com

250 2.1.0 me@myDomain.com. . . .Sender OK

rcpt to:you@yourDomain.com

250 OK – you@yourDomain.com

DATA

354 Start mail input; end with <CRLF>.<CRLF>

Subject: The Subject of the message.

Press enter TWICE.

The body of the message goes here.

Press enter.

Enter a single period (.) and press enter once more.

250 2.6.0 <………………….> Queued mail for delivery

Quit

221 2.0.0 mail.yourDomain.com Service closing transmission channel


Lots more SMTP info.

Telnet to test pop3

Friday, February 26th, 2010

I found an easy way to test a pop3 connection today. It is a little know tool called telnet (It’s not really little know, but I never though of using it for pop3 so in my mind it is little known for that purpose).

From a command line in windows:

telnet NameOfPop3Server 110

user username

pass password

list

You will see a list of email in your mailbox

retr msgNumber

You will see the email you requested

quit


More POP3 commands:

stat – Returns the number of messages in mailbox and size of mailbox

dele msgNumber – Marks message msgNumber for deletion.

noop – Doesn’t do anything, just returns a positive response.

rset – Unmarks any messages that are marked for deletion.

top msgNumber numLines – Returns the header info and numLines of the body of message msgNumber.

uidl msgNumber – Returns the message number and the messages Unique ID Listing.


Note: If the telnet session ends for any reason other than using the quit command, messages marked for deletion will not be deleted.