[K12OSN] End Of Year Cleaning

Mark Sarria mes4294 at lausd.k12.ca.us
Thu Jun 15 18:44:01 UTC 2006


Well, I am using Samba-LDAP server, I looked in webmin and can't seem to
follow what you're talking about. I used the scripts provided (IDEALX) to
create the user account. I see there is a delete script but not sure if it
can be used to delete user accounts from just one group.

Mark Sarria
Sylmar High School
LAUSD
(818) 367-0299
 

-----Original Message-----
From: k12osn-bounces at redhat.com [mailto:k12osn-bounces at redhat.com] On Behalf
Of Scott Sherrill
Sent: Thursday, June 15, 2006 11:30 AM
To: Support list for opensource software in schools.
Subject: Re: [K12OSN] End Of Year Cleaning

Huck wrote:
> I would like to just delete all the accounts in one group the STUDENT 
> group,
> is there a way of doing this?

> you can use the webmin batch to do that...
> extract the usernames
> create a file:
> deletethese.txt  that contains the following:
> delete:usernameX
> delete:usernameY
> delete:usernameZ
> etc...
>
> then with the webmin useradmin module..
> use that file to delete the users&homedirs.
>
>

To build on Huck's suggestion if the students are all in group 100 (for 
example) you could do something like:

cat /etc/passwd | grep ":100:" | cut -d: -f1 | awk '{print "delete:"$1}'

from the command line

which will give you output similar to:
delete:games
delete:scott
delete:eric
delete:sherial
....

Double check before send the list into webmin - for example because I 
chose :100: as my search criteria,  there is a system account called 
games that is has a userid of 100 and it picked it up as well.

Scott

_______________________________________________
K12OSN mailing list
K12OSN at redhat.com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>




More information about the K12OSN mailing list