Perl Script: Add Users to Linux and Solaris Servers

This script is a network-enabled wrapper for the Unix

useradd command, which essentially adds users to a

local Unix machine. There are a number of different

options available, largely reproducing the functionality available from the native "useradd" command.

 

When run without arguments, the script will display its usage information. For specific information on each option, please see the man page for "useradd"; this offers a far more complete description than could be provided here.

 

NOTE:

The Expect Perl modules is required in order for this script to function properly.  This can usually be acquired from CPAN, via the following command:

 

perl -MCPAN -e 'install Bundle::Expect'

 

  • This sample can also be found in the samples directory within the product distribution.