|
November 2001
Shell Corner: Mkusers
Hosted by Ed Schaefer
Creating User Accounts with Mkusers
Some Unix variants (i.e., Solaris and SCO Open Server V) provide a command, useradd, for adding new user accounts. Bobby Higgins's (higginsbg1@home.com) Mkusers script automates the creation of user accounts by manipulating useradd and its options. Bobby also provides setpass, a "C" utility that sets a default password once a user is created, and mkusers.1, a man page for Mkusers.
From Bobby's original email:
Mkusers, a '93 ksh (dtksh) script, automates the creation of user accounts. It uses a data file, userlist, that has each new user's name listed, one user per line (i.e. Firstname Lastname). This script creates the username and the options for the useradd command for each user to be created. Mkusers' output is a script, cruser.ksh, that contains the commands to create each account.
Variable options for Mkusers are:
| Value |
Default Setting |
| home DIRs |
/home |
| default shell |
/usr/bin/ksh |
| input file |
userlist |
| output file |
cruser.ksh |
Evaluating Mkusers
To evaluate Mkusers, I created a file, userlist, with the first and last name "Ed Schaefer.&
|