+ Post New Thread
Results 1 to 6 of 6
How do you do....it? Thread, Make a script run for SINGLE domain user in Technical; have a basic script that i have put together, and it needs to run everytime she logs off, is there ...
  1. #1
    philtomo-25's Avatar
    Join Date
    Jun 2007
    Location
    Lancaster
    Posts
    87
    Thank Post
    4
    Thanked 3 Times in 3 Posts
    Rep Power
    12

    Make a script run for SINGLE domain user

    have a basic script that i have put together, and it needs to run everytime she logs off, is there anyway that i could get this script to run (just for this user) when she logs off the domain?

    I know there is the option of log off script for groups etc.. in AD, but not for the single user

    cheers

    phil

  2. IDG Tech News
  3. #2
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    990
    Thank Post
    192
    Thanked 39 Times in 32 Posts
    Rep Power
    25

    Re: Make a script run for SINGLE domain user

    Use GP filtering so that GPO only applies to that user.

    In GPMC, create the GPO with the logoff script.
    The scope tab show the Security Filtering - it list Authenticated Users by default (i.e. everyone in the OU it's linked to and below).
    Click remove to remove authenticated users and click add to add the users name.

    That's it - a GPO that only applies to the named user (or group or whatever you put in the filtering). You'll still need to link it to an OU that's above the named user, or it won't apply to anyone.

  4. #3

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    13,908
    Blog Entries
    8
    Thank Post
    728
    Thanked 1,374 Times in 1,203 Posts
    Rep Power
    364

    Re: Make a script run for SINGLE domain user

    Something a little easier, make an OU for the users concerned and apply the policy for that OU. If she is already in a OU with a policy make another OU inside that OU.

    Z

  5. #4
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,641
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    31

    Re: Make a script run for SINGLE domain user

    Quote Originally Posted by FN-Greatermanchester
    Something a little easier, make an OU for the users concerned and apply the policy for that OU. If she is already in a OU with a policy make another OU inside that OU.

    Z
    That would certainly work, but it's not a particularly scalable or flexible solution. IMHO, the best way to do this would be to use the filtering, but rather than putting the user account in the DACL, I would create a group, whose name matches GPO that contains the script and add the required user(s) to the script.

    I try to avoid adding users to DACLS for one simple reason. When the user account gets deleted, the DACL is left with a reference to a non-existent user account. When you look at the DACL, all you see is the GUID/SID reference. You'll have no idea who/what it refers to. If you use a group of course, the group will still be there. When you want to get rid of the group, rather than deleting it, remove all the user accounts from it and rename it as UNUSED_(old group name).

  6. #5

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    8,960
    Thank Post
    991
    Thanked 1,016 Times in 597 Posts
    Rep Power
    689

    Re: Make a script run for SINGLE domain user

    Why not just deploy the logoff script but within the script have an IF depending on the user variable ?

    Code:
    If %Username% = XYZ
     Run the script
    else
     quit the script
    You can use If from batch or better still use AutoIT to do it.....
    Thats how I would do it anyhoo..........saves all the mucking around with OUs etc...

    My motto - KEEP IT SIMPLE

  7. #6

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    13,908
    Blog Entries
    8
    Thank Post
    728
    Thanked 1,374 Times in 1,203 Posts
    Rep Power
    364

    Re: Make a script run for SINGLE domain user

    I agree with mattx that will be the best solution.

    Z

SHARE:
+ Post New Thread

Similar Threads

  1. Active Directory - Single and Bulk User creation and FREE!!
    By siuko in forum How do you do....it?
    Replies: 39
    Last Post: 20th June 2012, 11:29 AM
  2. Replies: 15
    Last Post: 2nd November 2009, 05:21 PM
  3. Vbscript reset a single domain user's password
    By ryan_powell in forum Scripts
    Replies: 9
    Last Post: 4th June 2009, 02:43 PM
  4. sql server single user
    By Uraken in forum Windows
    Replies: 0
    Last Post: 18th May 2007, 12:29 PM
  5. Moving from single label to dotted domain name..
    By johnny in forum How do you do....it?
    Replies: 8
    Last Post: 23rd February 2007, 01:31 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •