echo "Running create_user.sh for Oracle install on Linux" # modify files in /etc before running this script # create the ORACLE_HOME directory for the database mkdir -p /u01/app/oracle/product/10.2.0 # create the user oracle's home directory mkdir /opt/oracle # create the groups that the user oracle will belong to /usr/sbin/groupadd oinstall /usr/sbin/groupadd dba /usr/sbin/groupadd oper # create the user oracle, with primary group oinstall, # secondary groups dba and oper # and home directory /opt/oracle /usr/sbin/useradd -m -g oinstall -G dba,oper -d /opt/oracle oracle # set the login passwod for the user oracle /usr/bin/passwd oracle # make oracle the owner of the home directories and set the permissions chown -R oracle:oinstall /u01/app/oracle chown oracle:oinstall /opt/oracle chmod -R 775 /opt chown oracle:oinstall /etc/oraInst.loc chmod 644 /etc/oraInst.loc