CHECKUSERS(1)

NAME
checkusers - Program to check if users exist for a given directory

SYNTAX
checkusers [ NO OPTIONS YET! ]

DOCUMENTATION
Basically, what the checkusers program does is it checks a specified directory as is documented in the Perl script.

What this program does is it looks through the specified home directory, and it checks against the /etc/passwd file that houses the user information.

Any directories in the HOME-USER directory that do not show up in the /etc/passwd directory are either listed out or automatically deleted per request in the script settings.

PERL SCRIPT SETTINGS

$HOME_DIR
    This is the directory that houses the users' home directories. This is basically the directory that is used in both parsing and displaying the directory file.

$LS_COMMAND
    This is the command used to display the entire listing of the directory contents. Standard values are ls but some can be dir or listdir.

$CUT_PARSE
    Don't mess with this variable unless you absolutely know what you're doing. This is the piped command on the ls command that automatically cuts off all of the directory- tree names. Standard value is already listed in there, but you can change it if you are familiar with the cut command.

$DISP_MODE
    This is the verbosity display mode. Values are "V" for verbose mode, which is generally used for debugging. A setting of "S" is the standard screen output, and the "Q" setting gives NO output (or puts it in quiet mode.)

$AUTO_DELETE
    This tells checkusers to automatically delete any directories that it cannot find a user-match for. Be careful, though, you don't want to delete a directory you don't mean to.

FUTURE PLANS
Here are some future plans that I have for this script, broken down into small subsections...

INTERFACE
    I plan on updating the interface to use the ncurses version of dialog to make user input, and other things easier by far to use.

FUNCTIONALITY
    I plan to make more functionality in the program and make it more flexible not only by the dialog addition, but also by making a configuration file. It may sound ridiculous, but it IS a good way for making a good tool even better.

PROGRAM SPEED
    I plan to optimize this program greatly to make it more flexible and faster.

BUGS
ARGH! The only word that I hate the most. Ohwell, there ARE a notable amount of bugs in this script, as there are with all programs. I prefer to call these undocumented features, if you don't mind. :-)

The check_options routine only checks for blank options, it does not check for correct options (yet.)

initialize_dir does not put the directory output into an array structure yet. I have yet to do this.

check_loop needs to be optimized to speed things up. This is ridiculously slow, but it does the job; I'm not complaining. It's not a bad job for a hack. :-)

main_part is not showing any evidence of bugs.

THE SEARCH ROUTINE IS SLOW AS HELL! (but this will be fixed soon. :-)

AUTHOR
Ken Hollis (khollis@chatlink.com)

AVAILABILITY
This perl script is available on both the Bitgate Software home page archive at URL: http://www.bitgate.chatlink.com/ and it is also available on the bitgate.chatlink.com ftp site under the directory "pub/dev/perl/checkusers". It is also available on sunsite.unc.edu.