You are not logged in.
I realized my script for deleting users was not working properly. For some reason it did delete the user account from the system but did not use the 'userdel -r' command. I think I may have left some home directories in the system that are from old deleted accounts. Is there a command or way I can see what directories under /home are not tied to accounts that are in /etc/passwd?
./
Offline
If the list isn't too large:
$ sed 's/\:.*$//' /etc/passwd |sort > a1
$ ls /home/ |sort > a2
$ diff a1 a2
Good ideas do not need lots of lies told about them in order to gain public acceptance.
Offline
for file in /home/*
do echo $file: $(cat /etc/passwd|grep $file|wc -l)
done
I know this is a really ugly script but that's because I'm all at the beginning. But I wished to once post a script in the forum so hard
I don't know how full your /home/ is and how long this will take. But anyway... Maybe it could actually help XD
btw. it will pass a list of all folders. a zero next to abandoned folders.
EDIT: Okay... grey wins in every sense but it was a start.
Last edited by panuh (2010-02-02 16:01:21)
Offline
find owns you :-)
find /home -maxdepth 1 -nouser
Regards,
raf
Offline