[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]