#! /bin/sh # This shell script changes both the SYSDBA user #------------------------------------------------------------------------ # Prompt for response, store result in Answer Answer="" AskQuestion() { Test=$1 DefaultAns=$2 echo -n "${1}" Answer="$DefaultAns" read Answer } #------------------------------------------------------------------------ # changeInitPassword changeInitPassword() { NewPasswd=$1 InitFile=/etc/rc.d/init.d/firebird if [ -f $InitFile ] then ed $InitFile < $DBAPasswordFile echo "for user SYSDBA is : $NewPasswd" >> $DBAPasswordFile echo "generated on `hostname` at time `date`" >> $DBAPasswordFile echo "" >> $DBAPasswordFile echo "(For superserver you will also want to check the password in the" >> $DBAPasswordFile echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile echo "" >> $DBAPasswordFile echo "Your password can be changed to a more suitable one using the" >> $DBAPasswordFile echo "@prefix@/bin/gsec program as show below:" >> $DBAPasswordFile echo "" >> $DBAPasswordFile echo ">cd @prefix@" >> $DBAPasswordFile echo ">bin/gsec -user sysdba -password " >> $DBAPasswordFile echo "GSEC>modify sysdba -pw " >> $DBAPasswordFile echo "GSEC>quit" >> $DBAPasswordFile chmod u=rw,go= $DBAPasswordFile $IBBin/gsec -user sysdba -password masterkey <