I'm trying to find a script or xml file that will allow me to run through the entire User DB without a group association to delete users from a .csv file. I've had no luck modifying what I've been provided with so far.
Maybe you should include what have you been provided with and point out areas that you have difficulties with?
If you have "file.csv" with this info:
"User 1","Group A"
"User 2","Group B"
You could run:
for /f "tokens=1,2* delims=," %%i in (file.csv) do (
sbadmcl.exe -commandeleteUser -database:"DATABASE" -user:%%i -group:%%j -recycle:true -adminuser:ADMIN -adminpwdASSWORD
typo, changed "sbadmin" to "sbadmcl" on 1/26/10 8:57:59 AM EST
I have 368 .csv files of users that have been terminated. Some are not even Encryption users. They just dumped the whole list on me. Now, they have over 30 SB groups. The main user groups (no admins) correspond with group names ie group "A", "B","C", etc. Problem is, the csv files are not created with just the users in the A group or B group. There is a mix of every single possible user in every group so I am trying to bypass specifying a group altogether, because if I don't......that's a lot of scripts. I've spoken with gold support and they have told to speak to sales...which I have worked with before as McAfee consultant. I will try what you suggested tomorrow. There is a script out there that does it, but I can't get a hold of it.
I just tried it, it works fine.
I think your CSV files are formatted differently to what the script expects - why not post a sample of the file you are trying to process?
yes, the script expects to find "user,group" and your files are just "user".
you need to make your own script to walk your file - it's only text and batch files though, so that's easy.
you could just use "for /f %l in (sample.txt) do sbadmcl -command:deleteuser -user:%l -adminuser:.. -adminpwd:..." on a command line.
for some reason its still not pulling from the csv file.....I wrote it right into the command line and get error code "0xdb000004". the name was not found in the database...but when i put in one of the user's names...poof...its gone and works
instead of running "sbadmcl.." , use "echo %l" instead. This is just a batch file - it's not rocket science
You might well get a lot of 04 errors - it depends if the users exist etc..
you also might want to consider recycling them, rather than deleting them (just in case).