6.9 wajig del-user

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`


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0