
Installgen
Features and Benefits
Installgen
Demo Available for download...
Bookmark This Page

#! /bin/sh
# script: 1_macosx_920_prepinstall_1.sh
# Features: This shell script creates the UNIX account and group
# which will install and own the Oracle database software on the server.
# The UNIX account, encrypted password, group, and user directory info
is
# written into the Mac OS X NetInfo directory service using
# the nicl (NetInfo command line) utility. The user account directory
# is created from the template in /System/Library/User/Template/English.1proj
# and ownership is set to the new oracle UNIX account and group.
# It is generally run manually via a remote terminal session.
#
# Requirements: root account must be enabled on Mac OS X
# SSH and FTP access should be enabled on Mac OS X
# Script Sequence#: 1
# Used By: run manually as root
# Copyright 2002 by .com Solutions Inc.
#
# ---------------------- Revision History ---------------
# Date By Changes
# 10-09-2002 dsimpson Initial Release
# This output file was created by Installgen version 1.38 on Sat Nov
23 07:13:32 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net
# make sure the root user is running this script
if [ ! $LOGNAME = "root" ]
then
# the user running this script is not root - exit
echo "You must be logged in as the root user to run this script, exiting...."
# exit immediately!
exit
fi
# delete the UNIX group before attempting to create it
nicl . -delete /groups/dba
# create the UNIX group, with the nicl command in the local Mac OS X
NetInfo directory
# user gid is hard-coded to 100
/usr/bin/nicl . -create /groups/dba passwd "*"
/usr/bin/nicl . -append /groups/dba gid 100
/usr/bin/nicl . -append /groups/admin users oracle
/usr/bin/nireport . /groups name gid | grep dba
# delete the UNIX account before attempting to create it in the local
Mac OS X NetInfo directory
/usr/bin/nicl . -delete /users/oracle
# create the UNIX account, with the nicl command in the local Mac OS
X NetInfo directory
# user gid is hard-coded to 100 to match group id which was previously
created
# user uid is hard-coded to 700
/usr/bin/nicl . -create /users/oracle
/usr/bin/nicl . -append /users/oracle group dba
/usr/bin/nicl . -append /users/oracle gid 100
/usr/bin/nicl . -append /users/oracle uid 700
/usr/bin/nicl . -append /users/oracle shell /bin/bash
/usr/bin/nicl . -append /users/oracle home /Users/oracle
/usr/bin/nicl . -append /users/oracle realname "Oracle database owner
account"
/usr/bin/nicl . -v /users/oracle passwd 'rj3HFhGUYvwUQ'
/usr/bin/nireport . /users name gid uid shell home realname | grep oracle
# copy the user directory template for the new Oracle account - set
ownership
ditto '/System/Library/User Template/English.lproj' /Users/oracle
chown -R oracle:dba /Users/oracle

