Site Maintenance this evening The site will be offline for hosting changes. Time TBC

+ 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

    Join Date
    Jun 2007
    Location
    Lancaster
    Posts
    91
    Thank Post
    4
    Thanked 3 Times in 3 Posts
    Rep Power
    15

    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. #2
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,014
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30

    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.

  3. #3

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,936
    Thank Post
    886
    Thanked 1,692 Times in 1,471 Posts
    Blog Entries
    12
    Rep Power
    446

    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

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

    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).

  5. #5

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740

    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

  6. #6

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,936
    Thank Post
    886
    Thanked 1,692 Times in 1,471 Posts
    Blog Entries
    12
    Rep Power
    446

    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
  •