Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Users w/out SMIT

Status
Not open for further replies.

jkc924

MIS
Aug 5, 2002
35
0
0
US
Hi All,

Does anyone know of a script someone could run without using SMIT that would prompt for new user id and user name and add user with predefined defaults?

Thanks,
Judy
 
Simply:

#!/bin/ksh

if [ -o $2 ];
then
echo "Not enough arguments - you must specify a user id and username"
exit 1
fi

/usr/bin/mkuser id=$1 pgrp=staff groups=staff,security,system $2



Then you have to specify a user id and username and change the mkuser command to specify the standard paramters you want.

PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist - AIX V4 HACMP
 

Thanks for the reply. I have run the above script. Set password but when I try to login as the new user I get the following:
.profile[10]: unmask: not found.
.profile[11]: ch: not found.
It then disconnects my session. Any Ideas?
Thanks,
Judy
 
Hi,

Log in as another user and check out the .profile for that user via vi. It sounds like your default profile may be the problem here i.e. there are invalid entries.

Best of luck

PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist - AIX V4 HACMP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top