Unix Review > Archives > 2001 > November 2001

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.&

Sys Admin Spotlight

CMP DevNet Spotlight

C++/CLI: Cloning
Making copies of heap-based objects

In the News

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 11.0

Version 11.0 delivers every issue of Sys Admin from 1992 through 2005 and every issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!




MarketPlace

NEW! Numara FootPrints 9 - Service Desk Management
IT Service Management that Delivers. Real Value. Real Flexibility. Real Results. Free Demo.

Online Crash Analysis
Automatically capture customer crash data, no debugger required. Support for .NET, C++, OS X, Java.

Flowcharts from C/C++ code -- Free trial download
Understand C/C++ code in less time. A new team member ? Inherited legacy code ? Get up to speed faster with Crystal Flow for C/C++. Code-formatting improves readability. Flowcharts are integrated with code browser. Export flowcharts to Visio.

Visit Dell� Small and Medium Business Online Store
One Stop to Buy All Your Business IT Solutions. Browse Through Dell's Best Deals Online Now!

Wanna see your ad here?