Bringing Out the Dead (User IDs)
Novell Cool Solutions: Trench
By Bryan Berns
Digg This -
Posted: 16 Jul 2002
Recently we published this Q&A, and Bryan shared his solution for it.
Robert M. wrote: I'm having a little bit of a problem with DLUs. It seems that when a person logs into a machine and logs out, the ID is created and removed like normal. The problem is when the person logs in and then turns off the machine without logging out; then the DLU remains. I'm looking at a machine that has about 100 dead IDs on this. How can I wipe them all out at once? I tried net user but I have to know the account. I was going to do this with a maintenance ID. Can you please help?
Sorry, but there's no easy way to do this.
A complex way is to write an app which runs through the user list; enumerates the comment and deletes all which are created by Workstation Manager /except/ the current user.
We've already created an application that will delete users conditionally as specified by command line arguments.
Documentation and download for our 'deluser' program as well as a few other neat utilities are available at the following URL: http://www.cae.wisc.edu/~micro/
There's already a utility available in the NT and W2K Resource Kits. "addusers" has a switch to perform mass deletions. The "deluser" program mentioned above is a duplicate functionality to something that was created many years ago.
The program removes all unused Windows Profiles. For NT they are in %SystemRoot%\Profiles for Win2k/XP in <Systemdrive>\Documents and Settings. The directory and files for the current user, "Administrator", "Default User" and "All Users" are retained.
The first time remprof.exe is started, it extracts wbdcb34i.dll and wwnt34i.dll before executing. Saving the dlls in the same directory as remprof.exe improves speed in future runs. In Windows XP the user does not have enough rights to delete files in the profiles directory. But if it's used with an application object, it can be run as "secure system" that has full rights and can delete the profiles.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com