Deleting users in linux
I couldn't be bothered to spin up a VM for a Uni assignment and ended up adding a bunch of users and groups to my personal OS.
Below is a record of what I did as cleanup. The things I did were;
- create 4 users
- create 3 groups
- create some stuff in
/srv
(this is trivial to clean up)
I'm wondering if I may have missed anything with these steps. I'm not entirely familiar with user/group related stuff so I might have residual files laying around.
7 Replies
this isn't an exhaustive list, but check that there's nothing left in /home for those users, and check
/etc/groups
for any auto-created user groups
if you installed samba, you might have an smbpasswd entry, though I'm not sure where that's stored
other than that, I check /etc/default/useradd
, there might other settings
also just don't worry about it too much, if there's a dangling user file here or there that won't hurt your system at alllooking through
/etc/groups
doesn't reveal anything that looks odd, though there's a lot of stuff in there.
Home dirs only shows my stuff
the useradd
file only contains comments and SHELL=/bin/sh
I know it won't hurt if something's left over, and tbh it doesn't matter as I'm (hopefully) getting a new laptop soon, but I wanna clean up at least most of it just to know that I'm not gonna run into anything in time. From the additional checks you mentioned, looks like everything's revertedluckily users on linux are pretty simple, really not much more than a few files and an entry or three in /etc
yeah, simple...
It definitely didin't take me three hours to get the users & groups set up along with some file permissions stuff...
such a headache, the way I use linux either I can do something, or I can
sudo
do something, and it just works. managing user permissions? I'll stick to JavaScript I think 😂Wait until you add selinux or setfacl 😄
Mostly meant there's not much to what's created in disk, though
nope I'm good, this assignment was the only thing on the entire course that's even remotely sysadmin and I'm very content with that
I don't think it was related to this but I had to completely reinstall today due to a boot error 🎉
oof x_x
yeah, I can't imagine that being related to messing with users