I need to develop a perl script that will generate a formatted listing of
any user without a
home directory and any
home directory that is not attached to a user.
For example, if I used the script below to read in the systems users how would I print out which users do not have a home directory based on theirs
open (USERS, '-|' , 'getent passwd' ) or die $!; @passwd_entries = <USERS>; close USERS;
And if I read in the system's home directories with the script below how would I print out which directories do not have users attached to them?
open (HOMES, '-|' , 'ls /home' ) or die $!; @home_dirs = <HOMES>; close HOMES;