Results 1 to 2 of 2

Thread: Disable an account automatically

  1. #1
    Senior Member
    Join Date
    Jul 2003

    Disable an account automatically

    Anyone know of software or a way to disable accounts automatically after a certain period where the user does not use the account. This is for a Novell server. If there are software that can do this for Windows that will be helpful too.

    eg. User account 'jdoe' is disabled by the server or software if John Doe does not log in for a period of say 1 month.

    I tried searching but I end up getting information on stuff that does not exactly suit my purpose.


  2. #2
    AO ├╝bergeek phishphreek's Avatar
    Join Date
    Jan 2002
    I was looking for a utility that would do the same thing a while back... but came up empty handed. If you find one that does the job... send me a PM just in case I forget to check back with this thread.

    I'd appreciate it!

    Disable user from command prompt that would be useful in a script... but couldn't find the right tools to make my script.

    w00t! w00t! Found a way to find out the last user logons... now to make a script.

    ' List last logon times
    ' 2001-03-27 John Savill, Jakob Hussfelt
    On Error Resume Next
    sObjects = Split(sEnterDCs, ",")
    Set oDomain = GetObject("WinNT://" & sObjects(0))
    oDomain.Filter = Array("User")
    WScript.Echo "Showing last login times of accounts from: " & oDomain.Name & vbNewLine
    For Each oDomainItem In oDomain
      sUsrLogin = oDomainItem.LastLogin
      If UBound(sObjects) >= 1 Then
        For ii = 1 To UBound(sObjects)
          Set oUsr = GetObject("WinNT://" & sObjects(ii) & "/" & oDomainItem.Name & ",user")
          If oUsr.LastLogin > sUsrLogin Then sUsrLogin = oUsr.LastLogin
      End If
      WScript.Echo "Username: " & Left(oDomainItem.Name & Space(22),22) & "Last login: " & FormatDateTime(sUsrLogin)
    Just make sure to change the


    to reflect the correct machine names or domain name.

    I'm off to toy with this a bit more.

    Turns out that you can use "usrstat.exe" from the resource kit to do something similar...

    AhHA! Found a script that finds and offers to disable inactive users... no need to write one now. Check it out here.

    Novell's list of users and account logons...

    Check out these novell user mgt utilities too... not sure what version of novell you're using though.

Posting Permissions

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