Tool

Expire Accounts Not Used in 30 Days

Author Info

11 October 2007 - 10:02am
Submitted by: djbrightman

tool
Reads:

776

Score:
0
0
 
Comments:

0

license: 
Free

Cool Tool: lastlogin - Generate Report Based on Last Login Time This is a great script, many thanks to Don for his sterling efforts.

I have a client whose requirement (set by the pesky auditors!) is to automatically expire any account that hasn't been used in the last 30 days, so I amended the script to allow this type of functionality:

# Modified to take into account whether the account is enabled or disabled
# This is specified by the attribute 'logindisabled' and is either TRUE or FALSE
# The -e parameter has been defined so you can filter on only enabled accounts
# The report has also been modified to detail the logindisabled state
# The original 'delfile.ldif' has been modified to an 'expfile.ldif' - this
# contains the ldap modify statements required to change the logindisabled state
# N.B. To reset the TRUE/FALSE field via ldap you seem to need to 'delete' the
# existing attribute and then add back the required state
# Additionally, you need the "-" line between the delete and add....

Example of the ice command required to import the generated file:

ice   -l <icelog> -S LDIF -c -f expfile.ldif	\
            -D LDAP -s <server> -p<port> -d <admindn> -w <adminpw>

AttachmentSize
lastloginexp.zip5.64 KB

Author Info

11 October 2007 - 10:02am
Submitted by: djbrightman




User Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <i> <cite> <code> <img> <ul> <ol> <li> <div> <dl> <dt> <dd> <b> <strong> <h1> <h2> <h3> <pre> <table> <td> <tr> <th> <blockquote>
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
7 + 7 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

© 2008 Novell, Inc. All Rights Reserved.