Console - root command prompt displayed twice after hitting enter


 
Thread Tools Search this Thread
Operating Systems Solaris Console - root command prompt displayed twice after hitting enter
# 1  
Old 06-14-2010
Console - root command prompt displayed twice after hitting enter

Dear All,
I hope you can help me.

I have a pair of E2900's I've inherited. Both running Solaris 9. Both have LOM> consoles. The problem I'm experiencing only occurs when connected to the /dev/console tty. Whenever I hit 'Enter' for a new line, I receive two new lines: -

Code:
myhost#                    <--- Hit Enter here
myhost#
myhost#                    <--- Hit Enter here
myhost#
myhost# tty               <--- Hit Enter here

/dev/console
myhost# myhost#

I have tried searching all other places for help, I suspect either my LOM is setup incorrectly or my inittab is.

Code:
myhost# myhost# cat /etc/inittab

ap::sysinit:/sbin/autopush -f /etc/iu.ap
ap::sysinit:/sbin/soconfig -f /etc/sock2path
fs::sysinit:/sbin/rcS sysinit           >/dev/msglog 2<>/dev/msglog </dev/console
is:3:initdefault:
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog
sS:s:wait:/sbin/rcS                     >/dev/msglog 2<>/dev/msglog </dev/console
s0:0:wait:/sbin/rc0                     >/dev/msglog 2<>/dev/msglog </dev/console
s1:1:respawn:/sbin/rc1                  >/dev/msglog 2<>/dev/msglog </dev/console
s2:23:wait:/sbin/rc2                    >/dev/msglog 2<>/dev/msglog </dev/console
s3:3:wait:/sbin/rc3                     >/dev/msglog 2<>/dev/msglog </dev/console
s5:5:wait:/sbin/rc5                     >/dev/msglog 2<>/dev/msglog </dev/console
s6:6:wait:/sbin/rc6                     >/dev/msglog 2<>/dev/msglog </dev/console
fw:0:wait:/sbin/uadmin 2 0              >/dev/msglog 2<>/dev/msglog </dev/console
of:5:wait:/sbin/uadmin 2 6              >/dev/msglog 2<>/dev/msglog </dev/console
rb:6:wait:/sbin/uadmin 2 1              >/dev/msglog 2<>/dev/msglog </dev/console
sc:234:respawn:/usr/lib/saf/sac -t 300
co:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` console login: " -T sun -d /dev/console -l console -m ldterm,ttcompat
mF:2345:wait:sh /etc/mflmrcscript > /dev/null 2>&1
myhost# myhost#

Appreciate any help you can offer.

Last edited by pludi; 06-14-2010 at 02:35 AM.. Reason: code tags, please...
# 2  
Old 06-14-2010
Your /etc/inittab looks fine. I do not think that is the problem.
# 3  
Old 06-15-2010
Anything look strange in either my /etc/profile or /.profile then...

/etc/profile...


Code:
#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

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 002
umask  022
trap  2 3


#Modifications Start
PATH=$PATH:/usr/openwin/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/local/bin:/opt/j2sdk1_3_1_02/bin
export  PATH
COBDIR=/opt/lib/cobol
export COBDIR
# The Option below is  needed for the COBOL Licensing daemon
ASLMFRETRY=25,30
export  ASLMFRETRY
LD_LIBRARY_PATH=/opt/lib/cobol/lib
export  LD_LIBRARY_PATH
# Oracle Changes
ORACLE_BASE=/oracle/product/9.2.0
ORACLE_HOME=/oracle/product/9.2.0
ORACLE_SID=INGP
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
export  ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

# CICS  Changes
LANG=en_US
#NLS_LANG="ENGLISH_UNITED KINGDOM.WE8ISO8859P1"
NLSPATH=/opt/cics/msg/%L/%N:/opt/cics/msg/C/%N:/opt/dcelocal/nls/msg/%L/%N:/opt/encina/msg/%L/%N:/opt/encina/msg/C/%N:$NLSPATH
CICS_SFS_SERVER=/.:/cics/sfs/hkksnm01
CICS_HOSTS=hkksnm01
RPC_SUPPORTED_PROTSEQS=ncadg_ip_udp
PATH=$PATH:/opt/cics/bin:/opt/dcelocal/bin:/opt/encina/bin:/opt/rexx
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cics/lib:/opt/dcelocal/lib:/opt/encina/lib
ENCINA_BINDING_FILE=/var/cics_servers/server_bindings
export  LANG NLSPATH CICS_SFS_SERVER PATH LD_LIBRARY_PATH CICS_HOSTS  RPC_SUPPORTED_PROTSEQS ENCINA_BINDING_FILE NLS_LANG
# Required for  libconnector support for rts32
export LD_LIBRARY_PATH

#  Modifications End

MANPATH=$MANPATH:/usr/local/man:/usr/man:/usr/share/man;export  MANPATH
PATH=$PATH:/usr/local/bin:/opt/lib/cobol/bin:/usr/local/sbin
EDITOR=/bin/vi;export  EDITOR
stty erase ^H
set -o vi

# Added by EMCpower_install
#PATH=$PATH:/opt/EMCpower/bin:/etc
#export  PATH
# Done additions by EMCpower_install
#JAVA_HOME=/opt/product/j2re1.4.2_04
#export  LANG JAVA_HOME


# DENY DIRECT LOGIN #
# The following  section denys direct login of certain id's.
# To utilize this code:  create a file /etc/profile.no.direct.login.IDs.
# Set ownership of  above file to root, protection to 444.
# Each line in the file  contains one ID for which direct login is prohibited.
# Each entry in  the file must begin in column 1.
#
if [ -f  /etc/profile.no.direct.login.IDs ]
  then
    cat  /etc/profile.no.direct.login.IDs | while read ID_ENTRY;
    do
       if [ "`logname`" == $ID_ENTRY ]
        then
          echo ""
           echo "###########################################"
          echo "#  Direct login not allowed for this ID !! #"
          echo  "###########################################"
          echo ""
           echo "Exiting..."
          sleep 2
          exit
      fi
     done
fi
# END DENY DIRECT LOGIN #

PATH=/usr/bin:$PATH    #  SD Installer: do not remove !
export PATH    # SD Installer: do not  remove !
. /etc/emc/bin/emcp_setup.sh
#
#

Code:
############################
#
#/.profile...
#

stty  erase '^H'
export VISUAL=vi
export EXINIT="set showmode showmatch"
export  PS1="`uname -n`# "
#
#
export  PATH=$PATH:/usr/openwin/bin:/opt/VRTS/bin:/usr/local/bin:/usr/symcli/bin
export  MANPATH=$MANPATH:/opt/VRTS/man
alias psora="ps -ef|grep ora"
alias  gnv="get_nic_vals.sh"
alias str="export TERM=vt100;resize"
set -o  vi

export VISUAL=vi
export EXINIT="set showmode showmatch"
export  PS1="`uname -n`# "
#
#
export  PATH=$PATH:/usr/openwin/bin:/opt/VRTS/bin:/usr/local/bin:/usr/symcli/bin
export  MANPATH=$MANPATH:/opt/VRTS/man
alias psora="ps -ef|grep ora"
alias  gnv="get_nic_vals.sh"
alias str="export TERM=vt100;resize"
set -o  vi


Last edited by pludi; 06-15-2010 at 05:19 AM.. Reason: code tags, please....
# 4  
Old 06-18-2010
something similar on my SF4800 and SF-e4900 consoles as well.

I don't think this is related to something present in .profile[s], else it would have caused the same behavior at normal prompt ( which is not the case. )


What I have been using to eliminate this during major upgrades is "CTRL-j" which simply sends single enter and everything works perfectly okay.

Regards,
BB
# 5  
Old 06-18-2010
Quote:
Originally Posted by busyboy
something similar on my SF4800 and SF-e4900 consoles as well.

I don't think this is related to something present in .profile[s], else it would have caused the same behavior at normal prompt ( which is not the case. )


What I have been using to eliminate this during major upgrades is "CTRL-j" which simply sends single enter and everything works perfectly okay.

Regards,
BB
Yes, that seems to work. A permanent fix if anyone know's one would be better. Seems like its the old carriage return & new-line being sent when only one of them is required. I wonder if any of these stty settings might be the culprit: -

Code:
myhost# myhost# stty -a

speed 9600 baud;
rows = 0; columns = 0; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^h; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
myhost# myhost#

# 6  
Old 06-18-2010
I compared your stty output with the one from some of my servers. The only difference I could find - besides erase - is, that you have local mode off (flag -clocal) and it's on here.

This is the output from a V490 console via RSC:

Code:
# stty -a
speed 9600 baud;
rows = 0; columns = 0; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb hupcl cread clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3

# 7  
Old 06-18-2010
I just recalled this sort of behavior is usually started after a longer period of activity on the Consoles.

I'm not sure about this, but it happens likewise .

I just tried one of the consoles on SF-e4900 and its working fine now and I still remember that we had to use the same key-sequence for the whole of night in a upgrade.

hergp:

Can you please check if this time based scenario is there with v490's console as well?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Auto enter for prompt messages

Hello everybody, I am coding a script, that allow the user to enter some information using prompt messages, i.e: sEpisode=1 read -e -i "$sEpisode" -p "Start download from episode: " downloadFrom sEpisode="${downloadFrom:-$sEpisode}" This code allows the user to set the download from... (4 Replies)
Discussion started by: Abu Rayane
4 Replies

2. Solaris

Console Prompt

Hey guys, I'm trying to get the servers up, but I am having a hard time just trying to get in the system and configure it. I am connecting to the Sun 240,220 servers via the Serial Connection. Watching the server come up after it starts to come up and does all the post message the screen... (6 Replies)
Discussion started by: br1an
6 Replies

3. Shell Programming and Scripting

Script to prompt user to enter data

Hi All I have a script that moves files from one dir to another dir based on date, but I would like to change it in a way that whoever is going to run to enter the dates in which files will be removed. This is my script: #!/bin/sh touch -mt 201302250000 /tmp/ref3 touch -mt 201302282359... (14 Replies)
Discussion started by: fretagi
14 Replies

4. Shell Programming and Scripting

how to prompt the user to enter an array in tcsh

Hello, I am writing a script that requires the user to enter a string of numbers: ex: 134 345 865 903 This command only allows for one variable to be entered: set "var" = $< and than once I got the array I want to change it to a list with each input on a different line: ... (1 Reply)
Discussion started by: smarones
1 Replies

5. Shell Programming and Scripting

How to enter commands to the command prompt in a program

Hey, So I'm trying to write a program in unix to automate a process for my astrophysics research. Basically I want the program to prompt the user for some information and store the entered string of text as a variable. I know how to do this. This is where I need help: Now lets say I have a... (4 Replies)
Discussion started by: freemoniez
4 Replies

6. Shell Programming and Scripting

enter password at prompt during a script?

I'm using rsync with the "-e ssh" option so of course it asks for a password using a prompt. Is there a way to tell a script to expect a prompt, wait for it, and give a password when it arrives? There is a way to give rsync a password as part of its options using a file, but it only works with... (2 Replies)
Discussion started by: davidstvz
2 Replies

7. UNIX for Advanced & Expert Users

su command without password prompt to non-root account

Hello. I searched the internet for answers and don't seem to find any for about a day now. My problem. I want to su to a non-root account non-interactively, e.g. if I want to temporarily become prdusr, I want to su prdusr without keying prdusr's password every time. What I want is... (10 Replies)
Discussion started by: royale-sojin
10 Replies

8. Shell Programming and Scripting

How to enter if-then condition on command prompt/line ?

Hi I have some trouble entering if-then condition in a single line on a command prompt in csh. Could someone show how does one do that ? eg: source .cshrc; cd $dir; pwd; test -d $backup_dir; if then mkdir -p ${backup_dir}; echo inside loop; fi; echo outside loop; mv -f... (3 Replies)
Discussion started by: mpc8250
3 Replies

9. UNIX for Dummies Questions & Answers

I need it to prompt me for a root password, so I don't have to log as root

Hi folks, I'm trying to install a program, and I want to place some of the executables into /usr/bin so that they can be executed from any folder on the computer. I've been giveng the root password, but told never to log in directly as root. Instead, I can wait for a password prompt. However, I... (2 Replies)
Discussion started by: lunchtime
2 Replies

10. UNIX for Dummies Questions & Answers

no $ prompt while starting console

I had this problem before but it started working OK for a while. I can create a new profile but when I launch the console for that user it does not show the $ prompt. It shows for su and I tried to set the terminal but I am not sure if I did it correctly since it does not work still. The... (9 Replies)
Discussion started by: softarch
9 Replies
Login or Register to Ask a Question