No prompt!


 
Thread Tools Search this Thread
Operating Systems Solaris No prompt!
# 8  
Old 01-19-2010
an FYI for others. this behavior happened exactly as described above regarding several of my boxes. i ended up finding out that the file /etc/issue had thousands of lines of carriage returns. obviously removing the file and creating a new one resolve the issue. fun times trying to figure that little gem out Smilie
# 9  
Old 01-19-2010
Another different cause of similar behavior can be the /usr/sbin/quota command which is part of the /etc/profile script taking an very long time to proceed.
# 10  
Old 01-20-2010
Thank you for the feedback.

I have checked and found neither /etc/issue exist nor quota has been set in this server.

I have executed "truss -a logname" and found that there is some difference when compared with another server's output.

Server with logname returning null value

Quote:
......
stat64(0, 0xFFBFF508) = 0
ioctl(0, TCGETA, 0xFFBFF494) = 0
stat64("/dev/tty", 0xFFBFF410) = 0
stat64("/dev/console", 0xFFBFF410) = 0
stat64("/dev/conslog", 0xFFBFF410) = 0
stat64("/dev/syscon", 0xFFBFF410) = 0
open("/var/adm/utmpx", O_RDONLY) = 3
fstat64(3, 0xFFBFF448) = 0
brk(0x00024188) = 0
brk(0x00026188) = 0
fstat64(3, 0xFFBFF2F0) = 0
ioctl(3, TCGETA, 0xFFBFF3D4) Err#25 ENOTTY
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0".., 8192) = 8192
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0".., 8192) = 364
......
Server with logname returning value
Quote:
....
fstat64(0, 0xFFBFF6A0) = 0
ioctl(0, TCGETA, 0xFFBFF62C) = 0
stat64("/dev/tty", 0xFFBFF5A8) = 0
stat64("/dev/console", 0xFFBFF5A8) = 0
stat64("/dev/conslog", 0xFFBFF5A8) = 0
stat64("/dev/syscon", 0xFFBFF5A8) = 0
stat64("/dev/systty", 0xFFBFF5A8) = 0
stat64("/dev/wscons", 0xFFBFF5A8) = 0
stat64("/dev/ptmx", 0xFFBFF5A8) = 0
stat64("/dev/ttyp0", 0xFFBFF4A0) = 0
stat64("/dev/ptyp0", 0xFFBFF4A0) = 0
open("/etc/ttysrch", O_RDONLY) = 3
fstat64(3, 0xFFBFF4A0) = 0
read(3, " #\n # C o p y r i g h".., 1495) = 1495
close(3) = 0
stat64("/dev/pts/5", 0xFFBFF4A0) = 0
open("/var/adm/utmpx", O_RDONLY) = 3
fstat64(3, 0xFFBFF5E0) = 0
brk(0x00024188) = 0
brk(0x00026188) = 0
fstat64(3, 0xFFBFF488) = 0
ioctl(3, TCGETA, 0xFFBFF56C) Err#25 ENOTTY
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0".., 8192) = 8192
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0".., 8192) = 5944
....
The problem server doesn't proceed beyond /dev/syscon..

Any input would be appreciated!
# 11  
Old 01-20-2010
Quote:
Originally Posted by sundar63
Thank you for the feedback.

I have checked and found neither /etc/issue exist nor quota has been set in this server.
Sure. These were examples of different root causes of similar issue. Yours has already been found and it is just the login script used is bogus. Logname isn't required to return a value so the script should take that into account.

You might test logname status and use a different approach to get the username like this:
Code:
logname=`logname`
logname=${logname:-`/usr/xpg4/bin/id -un`}

or simply use
Code:
/usr/xpg4/bin/id -un

in the first place.
# 12  
Old 01-20-2010
Quote:
Originally Posted by jlliagre
Sure. Logname isn't required to return a value ...
Well, if logname isn't required, how does the environment variable
LOGNAME get the value?

We have another server with similar configuration ( replica ) which works fine.There, it does return a value.

Anyways, these are my unresolved doubts.
I would try out your workaround, jlliagre Smilie.
Thank you for your invaluable assistance.Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Unable to move from rsc prompt to ok prompt

Hi, on sunfire v890 unable to move from rsc prompt to ok prompt, i have executed the command break. (9 Replies)
Discussion started by: manoj.solaris
9 Replies

2. UNIX for Dummies Questions & Answers

How to Change the % prompt to - prompt in UNIX?

how to Change the % prompt to - prompt in unix :wall: ---------- Post updated at 07:40 AM ---------- Previous update was at 07:38 AM ---------- How To display the last modification time of any file in unix ---------- Post updated at 07:40 AM ---------- Previous update was at 07:40 AM... (2 Replies)
Discussion started by: manjiri sawant
2 Replies

3. Shell Programming and Scripting

FTP prompt

Hello, I am connectin to a remote server using: ftp -n -i <server> user <username> <password> lcd ~/YAFFA after i execute lcd command ther is a prompt: "Local directory now /home/YAFFA" How can is make it disappear? :confused: Please use and tags when posting code, data... (2 Replies)
Discussion started by: LiorAmitai
2 Replies

4. Solaris

ok prompt

There is a number before the ok prompt in OBP between brackets {}. It is 0 most of the time but sometimes it is different number {9} ok or {0} ok What does this number mean and how it gets changed? (3 Replies)
Discussion started by: StarSol
3 Replies

5. Solaris

Changing prompt

I currently have this as my prompt when I log in (shell is sh): PS1="`hostname ` # " My question is how do I add the current directory to that prompt? Is there a way? Thanks. (5 Replies)
Discussion started by: kjbaumann
5 Replies

6. Shell Programming and Scripting

How to a prompt a particular value???

Hi i am working with clearcase in my UNIX machine... Accidentally some had ran a script to check out all files in the machine.... Now i am actually trying to uncheck out all those files and had written a script for it.... The problem is that when ever i am trying to uncheck out the files, its... (2 Replies)
Discussion started by: grajesh_955
2 Replies

7. Solaris

OK prompt

Here is a silly question: I have a Sun 220R and I need to get to the OK prompt. I can't hook up a monitor and keyboard to it. Its on a KVM right now and I also have a console connected to it. I can use PuTTY to get to the console and then connect to the 220R from there. How can I get to the... (3 Replies)
Discussion started by: hshapiro
3 Replies

8. Solaris

Can't get ok prompt

Hi, I'm attempting to reinstall a damaged installation of Solaris 9 (on a SunFire). Connected via serial from a PC. Can't get to the "ok" prompt to launch install from CD. Ctrl+break acknowledges my request for a break, but no prompt. "#." gets me an "sc>" prompt, with several options, but... (3 Replies)
Discussion started by: shonenfan
3 Replies

9. UNIX for Dummies Questions & Answers

prompt why ?

Even though I give rm -f *, the files are listed for confirmation of removal . Why ? Thanks LS (2 Replies)
Discussion started by: ls1429
2 Replies

10. UNIX for Dummies Questions & Answers

prompt

how do we change the command prompt? right now my prompt says felix% where felix is the machine i´m on. but how do we change it? for example, how can i make it say me% and how do we get it to tell us what directory we are under because when i change into a subdir then the prompt... (1 Reply)
Discussion started by: eeldivady
1 Replies
Login or Register to Ask a Question