[luau] Nightly user killoff

dean fujioka dean at fujioka
Thu Oct 3 15:01:00 PDT 2002


I'm trying to implement a script that will kill off extraneous users every 
night. I thought the command worked from the CL, but it appears to be broken 
now. here is the script

skill -9 `users | sed -n -e "s/root//g" -n -e "s/settle//p"`  # > ./killem.log

What I want to do is to kill all users besides root, settle, (of course now i 
need to add another one, but first things first.
Is there a reason why this would work in Rhat 6.2 but not in Rhat 7.2?
Do I need to add anything special to get this to run  as a cron job?

I think my problem began when I tried to add this second user, settle.
Also, if there are multiple instances of root, I don't want to kill any of 
them. Is there a way for sed to remove all instances without adding another 
"s/root//"  for each one?

dean



More information about the LUAU mailing list