Hi all,
After editing the /etc/profile i am not able to issue any command at all. I have a backup profile under /etc/profile.bak but even logging as root user could not do any thing much, i need to copy this file back to solve the problem. please help
below is the new profile which i cant copy into the /etc/profile as root or normal user because none of the commands works. please give me any other solution.
#ident "@(#)profile 1.19 01/03/13 SMI" /* SVr4.0 1.3 */
# The profile that all logins get before using their own .profile.
trap "" 2 3
export LOGNAME PATH
PATH=$PATH:/usr/local/bin
export PATH
CC=gcc;export CC
if [ "$TERM" = "" ]
then
if /bin/i386
then
TERM=sun-color
else
TERM=sun
fi
export TERM
fi
# Login and -su shells get /etc/profile services.
# -rsh is given its environment in its .profile.
case "$0" in
-sh | -ksh | -jsh | -bash)
if [ ! -f .hushlogin ]
then
/usr/sbin/quota
# Allow the user to break the Message-Of-The-Day only.
trap "trap '' 2" 2
/bin/cat -s /etc/motd
trap "" 2
/bin/mail -E
case $? in
0)
echo "You have new mail."
;;
2)
echo "You have mail."
;;
esac
fi
esac
umask 022
trap 2 3
JAVA_HOME=/usr/j2se
#CATALINA_HOME=/usr/local/tomcat
CATALINA_HOME=/opt/local/tomcat5.5
export JAVA_HOME CATALINA_HOME
export PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
export CLASSPATH
Below is the problem when i login as root or normal user .
Last login: Thu Apr 27 09:04:48 2006 from 192.168.1.113
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
-sh: PATH=/usr/ccs/bin:/usr/j2se/bin: is not an identifier
$ ls
ls: not found
$ ls
ls: not found
please help me....