Use standard error message reporting
Digging through the source code for useradd in the shadow source tree, I found this:
/* * Get my name so that I can use it to report errors. */ Prog = Basename (argv);
I've noticed that a lot of the coreutils and other utils packages aren't exactly standard in the format they use to report errors. This seems like a logical way of doing it (prefixing error messages with either the executable path, or the basename of that path), and always makes it very clear where the errors are coming from. This is fairly invaluable when doing any kind of scripting.