[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Deleting many Users
- From: King_Kong <o1o kh refer org>
- To: enigma-list redhat com
- Subject: Re: Deleting many Users
- Date: Wed, 9 Jan 2002 11:45:15 +0700 (ICT)
I'll do it a try...
Thanks a lot Sven!
K_K
On Tue, 8 Jan 2002, Sven Vermeulen wrote:
> On Tue, Jan 08, 2002 at 03:31:16PM +0700, King_Kong wrote:
> > I have a text file containing some usernames (500) like this:
> > user1
> > user2
> > user3
>
> I assume you want to delete those users from the system ;-)
>
> ~$ cat remove_those_users yourfile
> #!/bin/bash
>
> while read userline
> do
> /usr/sbin/userdel -r $userline
> done < $1
> ~$
>
> So the only thing you need to do is
>
> ~# ./remove_those_users yourfile
>
> And your users will be history.
> Also, if you _don't_ want to remove their home-directories too, remove the
> "-r" from the script.
>
> Wkr,
> Sven Vermeulen
>
> --
> Unix, MS-DOS and Windows NT (also known as the Good, the Bad and the
> Ugly). ~(Matt Welsh)
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]