I'm trying to write a simple script that takes a list of users from a file
and creates a user account for them, using the useradd script.  The system
I'm doing this on is Solaris 8.  When I run the script I get the following
error.  It seems as if it's not accepting the variable in the command
line.  I'm pretty new to all of this so any help would be greatly
appreciated.

Error Message:

UX: useradd: ERROR: invalid syntax.
usage:  useradd [-u uid [-o] | -g group | -G group[[,group]...] | -d dir |
                -s shell | -c comment | -m [-k skel_dir] | -f inactive |
                -e expire | -A authorization [, authorization ...] |
                -P profile [, profile ...] | -R role [, role ...]]
                -p project [, project ...] login
        useradd -D [-g group | -b base_dir | -f inactive | -e expire
                -A authorization [, authorization ...] |
                -P profile [, profile ...] | -R role [, role ...]] |
                -p project
sh: -m: not found


Simple add user script:

#!/usr/bin/perl

open(FILE,"users.log");
@users=<FILE>;
foreach $users (@users) {
`useradd -g 201 -d /userhome/$users -m $users`;
}
print "done.\n";


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to