Originally posted by: IbnuHaroon
Hi,
I have been using the following command and scripts (Please refer below scripts) in my 2 servers and whenever the below script got executed i am getting the following error message in server security logs.
Message forwarded from server2: su: BAD SU from administrator to root at /dev/pts/0
Is this possible to stop getting the above error message? Any idea what in my below script causing this error message? Any suggestions to improve the below scripts?
My Servers are running AIX 6.1 TL8
Scripts:-
At Server 1:
ssh administrator@server2 "/usr/tmp/scripts/changetoroor.exp"
At Server2 , contents of the above script is /usr/tmp/scripts/changetoroot.exp
#!/usr/bin/expect
spawn su - root -c "sh /usr/tmp/scripts/DB_Script.sh"
expect "Password:"
send "mypass***"
interact
At Server2 :usr/tmp/scripts/DB_Script.sh
#!/bin/sh
TIMESTAMP=`date | awk '{print $3_$2_$6_$4}'`
su - mydb2account -c "db2 set write resume for database > /usr/tmp/scripts/logs/$TIMESTAMP.resume.log"
#AIX-Forum