Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Wajig Deluser

20200804 Users can be removed from the system with the deluser command. Any number of users can be listed.

$ wajig deluser fred mary

When being removed the home directory is backed up into a compressed tar file (.tar.bz2) and then deleted.

To remove users listed in a file which may have been the output from the adduser command, we can create the list of usernames from that file and pass that to the deluser command. Below we illustrate checking the building of the list of usernames, and once that is right, passing that list on to wajig.

$ cat passwds.txt
fred:oi8so4Tha4fei8Ew
mary:ohBu4eZeiz0bahth

$ cat passwds.txt | cut -d:-f1
fred
mary

$ cat passwds.txt | cut -d: -f1 | xargs echo
fred mary

$ wajig deluser `cat passwds.txt | cut -d: -f1 | xargs echo`


Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. Creative Commons ShareAlike V4.