|Question:||Is there a way to use the delacct command line to delete all accounts? I'm installing the first time and would like to import a modified EIMS export rather than my original EIMS export that I used for testing.|
|Answer:||Yes, using the command line utilities you can delete accounts in batch mode. Briefly, you need to run the 'listacct' program and send the output to a file. Then you need to hand edit the file to put './delacct' in front of each entry you want to delete, being careful not to delete the the default Post.Office accounts. Then make the file you created executable and execute the file.
Here are the steps in detail:
Log in to a terminal window as "root" and type in:
./listacct >> myfile
You can list out the contents of your file with the command:
You will see something like this:
This will create a file called "myfile" (you can name it anything you want) that will contain the user ID's of all of your users. Edit that file with an editor so it looks like this:
Don't delete Postmaster, Root, Error-Handler, List-Manager or any of the built in Post.Office accounts!
Once you have added the "delacct" at the beginning of each line, change the file permissions of myfile so that it is an executable file. Type in:
chmod +x myfile
and now run the file:
That will delete each account that is named in the file.
|last updated 18.10.2003|