+ Post New Thread
Results 1 to 6 of 6
Scripts Thread, Extractinga and displaying a list of blocked users for staff in Coding and Web Development; Hi As with all schools, we regularly block users for various offences. However I have problems providing communication to staff ...
  1. #1

    Join Date
    Nov 2005
    Posts
    15
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Extractinga and displaying a list of blocked users for staff

    Hi
    As with all schools, we regularly block users for various offences. However I have problems providing communication to staff regarding blocked students...is there a script (or program) that schools out their use that can scan active directory for disabled users and generate a html report or something similar...I would like to be able to put this on our Intranet for Teachers and maybe once every couple of days update it. Many thanks for your time

  2. #2

    Join Date
    Jan 2007
    Posts
    424
    Thank Post
    7
    Thanked 32 Times in 27 Posts
    Rep Power
    21

    Re: Extractinga and displaying a list of blocked users for staff

    You can do this live with some PHP based LDAP jiggery pokery

  3. #3

    Join Date
    Nov 2005
    Posts
    15
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Extractinga and displaying a list of blocked users for s

    any ideas where one can access some jiggery pockery

  4. #4

    Join Date
    Jan 2007
    Posts
    424
    Thank Post
    7
    Thanked 32 Times in 27 Posts
    Rep Power
    21

    Re: Extractinga and displaying a list of blocked users for staff

    Yes.. lets see.. http://uk3.php.net/ldap would be a place to start, as would 'Active Directory PHP' on Google too

    Kyle

  5. #5


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339

    Re: Extractinga and displaying a list of blocked users for s

    I have a python script to do things with non-disabled accounts (auto create zimbra accounts etc).
    use 514 to do things with disabled accounts.
    #userAccountControl 512 = normal , 514 = disabled account

    Code:
    #!/usr/bin/python
    import ldap, string, os, time, sys
                 
    domain =  "example.com"
    l=ldap.initialize("ldap://server."+domain+":389") # pick an LDAP server
    l.simple_bind_s("domain\\username","password") 
    
    scope	= 'ou=domain,dc=com'
    
      
    try:
        res = l.search_s(scope, 
        ldap.SCOPE_SUBTREE, "(&(ObjectCategory=user) (userAccountControl=512)(employeeType=STUDENT))", ['sAMAccountName','givenName','sn'])
    #userAccountControl  512 = normal , 514 = disabled account
        for (dn, vals) in res:
          do *whatever*
                     
    except ldap.LDAPError, error_message:
      print error_message          
    
    l.unbind_s()
    oh, I think in future the boss is planning on adding user defined fields to SIMS (we have it in CMIS and apparently LA say its OK to migrate). We will have AD account name and disabled (yes/no) as user defined fields in SIMS.

  6. #6

    TechMonkey's Avatar
    Join Date
    Dec 2005
    Location
    South East
    Posts
    3,299
    Thank Post
    226
    Thanked 412 Times in 305 Posts
    Rep Power
    163

    Re: Extractinga and displaying a list of blocked users for staff

    Surely you need to keep a log of them as well to know who is off so make a simple text file log system that shows the dates they are off. Then produce a page Staff can access that will show students that are currently banned. Keeps admin and communication neat and simple in one place

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 28
    Last Post: 15th August 2010, 09:47 AM
  2. List of users logged on a workstation
    By sLiDeR in forum Windows
    Replies: 6
    Last Post: 4th December 2007, 12:40 PM
  3. Staff Photo List in SIMS
    By markwilliamson2001 in forum MIS Systems
    Replies: 2
    Last Post: 1st October 2007, 03:52 PM
  4. Front Page Topics List - Staff Area
    By crc-ict in forum Comments and Suggestions
    Replies: 4
    Last Post: 18th January 2006, 06:23 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
  •