• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

Need some tricks to Audit a Domains login scripts

Hi All,

I need to Audit a company's Domain which has for some reason been creating a script for every single user in a /netlogon/users folder.

There is over 1600 .bat files and I was hoping that someone may know of a tool that can process them all and output the differences or something. I imagine that majority of the scripts are the same however they have been using username's instead of a variable %username% etc.

Some users are recieving different paths for drives as well.

Any assistance would be much appreciated

  • 2
1 Solution
Easiest place to figure this out would be to go into ADUC and check the users Profile tab and look and see what their login script is there.

It could be that everyone has the same base script but that script calls some actions to create new batch files for each user or something similar.

Check there first and report back the login script itself if it is the same for multiple users (the one in the profile tab of their account.

ALSO CHECK GROUP POLICY as well to see if there are login scripts there based on OU and not in their individual user accounts in ADUC.  Same thing applies though, look and see if there is a base script out there that everyone runs and track it sequentially from there.
use the FC command ( file compare ) or any  other  similar utility.

You may need to run it in a batch file to go through all the directories to give you results.

I would ask this question in the VB script or the MS DOS TA  section since that is where most of the batch/ scripting guys hand out.

I hope this helps !
Along the lines of what sysExpert is saying, I know that Primalscript has a built in comparison feature, but it is limited to 2 files, not 1600.  It will tell you which lines are different, etc.

I thought you were stating that it was creating 1600 batch files based on their login scripts...
mishramanujAuthor Commented:
Thanks for your info, basically I just used a nice little

type *.bat > all.txt

Then cut and copied to Excel - created a list and selected all sentences that started with MAP. Then I removed the duplicates and I was left with all Map commands.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now