On Thu, Nov 15, 2007 at 01:57:50PM -0500, Piet Slaghekke wrote:
| Ok thanks now it works!
| so If I want to remove the user account and all the user files on the system
| I use  userdel -r
| 
| Can I also use the rmuser command for this?
| 
| How do I write a script to do this and run it from a csh shell,  in other
| words what line do I need in the script to tell the system to run it in a
| Bourne Shell?

----------------------------------------------------------------------
#!/bin/sh

while read USER
do
        userdel -r ${USER}
done < /path/to/userlist
----------------------------------------------------------------------

If you want to use rmuser, simply substitute userdel -r with rmuser in
the above "scriptlet".

Cheers,

Paul 'WEiRD' de Weerd

-- 
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/                 

Reply via email to