?
Solved

No prompt after login

Posted on 2005-03-11
30
Medium Priority
?
565 Views
Last Modified: 2013-12-06
Some of my Unix accounts no longer give me a prompt after entering userId and password - I see
output, but never get a prompt from which to work.

Why is that??

Please elaborate - THANKS.
0
Comment
Question by:booksplus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 6
  • 5
  • +4
30 Comments
 
LVL 2

Assisted Solution

by:JackOfAll1
JackOfAll1 earned 400 total points
ID: 13519485
It sounds like the profile file or files are hosed.  

In AIX check /etc/profile or the /home/user/.profile

add PS1='$PWD: '

or what ever is appropiate for your OS.

Hope this Helps.
0
 

Author Comment

by:booksplus
ID: 13519717
.profile is fine - same as other .profile 's that are working (login with prompt).

If I type ctrl-c - I get my prompt - but I shouldn't have to do that - anymore ideas.
0
 
LVL 2

Expert Comment

by:JackOfAll1
ID: 13519875
If you have to type cntrl-c to get your prompt it sounds like a script is being invoked during the login that is not completing.  The cntl-c is exiting the script.
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 

Author Comment

by:booksplus
ID: 13520312
There's no script in the .profile - I added an output (echo) statement as the last line
in the file and it outputs fine.

Any other ideas??
0
 
LVL 2

Expert Comment

by:JackOfAll1
ID: 13520960
Are you invoking a new shell in either the profile or .profile scripts?
0
 
LVL 12

Assisted Solution

by:stefan73
stefan73 earned 100 total points
ID: 13521558
Hi booksplus,
> .profile is fine - same as other .profile 's that are working (login
> with prompt).

> If I type ctrl-c - I get my prompt - but I shouldn't have to do that
> - anymore ideas.

Did you do some blocking commands, such as a single "cat"?

Cheers!

Stefan
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 13521775
>  I added an output (echo) statement as the last line in the file and it outputs fine.
you mean that ~/.profile contains a echo as last statement which you see after login, but no prompt follows?
0
 

Author Comment

by:booksplus
ID: 13521981
ahoffman -

Yes - that is correct.  

my PS1 is fine too (same as other .profile 's and I do get promt after I do crtl-c)

Using Korn and not invoking anyother shell.

stegan73 - sorry, but not sure what you mean by single "cat"

jackOfAll - using Korn shell
0
 
LVL 3

Expert Comment

by:mike_mian
ID: 13523265
>If I type ctrl-c - I get my prompt - but I shouldn't have to do that - anymore ideas.

This implies you have a process that is running and for some reason hanging?
Have you made any edit to your profile recently?
Have the machines you are logging onto be upgraded/changed recently?
Could be a prboem with automounting a drive that has been removed that you explicitly
tryi to acces during  login.
type:
set -v
set -x
in your .profile

that should tell you where things are stopping.
0
 
LVL 3

Assisted Solution

by:mike_mian
mike_mian earned 200 total points
ID: 13523273
>Did you do some blocking commands, such as a single "cat"?

he means did you  add the line
cat in you strat -up script (eg .profile) as this would cause the out put to wait/block for input.

I f you do the above you will see if you accidently did this, or aleast see the commant that is blocking.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 13524308
please post /etc/.profile (without comments and empty lines)
0
 
LVL 38

Expert Comment

by:yuzh
ID: 13531190
Also check /var/adm/messagess file to see if there is any problem with NFS server.
0
 

Author Comment

by:booksplus
ID: 13534286
       trap "" 1 2 3
        PATH=/usr/bin:/usr/ccs/bin:/usr/contrib/bin
        MANPATH=/usr/share/man:/usr/contrib/man:/usr/local/man
        if [ ! -d /usr/sbin ]
        then
                PATH=$PATH:/sbin
        else    if [ -r /etc/PATH ]
                then
                        grep -q -e "^/usr/bin$" -e "^/usr/bin:" -e ":/usr/bin:"\
                                -e ":/usr/bin$" /etc/PATH
                        if [ $? -eq 0 ]
                        then
                                PATH=`cat /etc/PATH`
                        else
                                PATH=$PATH:`cat /etc/PATH`
                        fi
                fi
        fi
        export PATH
        if [ -r /etc/MANPATH ]
        then
                MANPATH=`cat /etc/MANPATH`
        fi
        export MANPATH
        if [ -r /etc/TIMEZONE ]
        then
           . /etc/TIMEZONE
        else
            TZ=MST7MDT               # change this for local time.
            export TZ
        fi
   if [ ! "$VUE" ]; then
        if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup"  \
             -o "$TERM" = "network" ]
        then
                eval `ttytype -s -a`
        fi
        export TERM
        if [ "$ERASE" = "" ]
        then
                ERASE="^H"
                export ERASE
        fi
        stty erase $ERASE
        trap "echo logout" 0
        cat /etc/copyright
        if [ -r /etc/motd ]
        then
                cat /etc/motd
        fi

        if [ -f /usr/bin/mail ]
        then
                if mail -e
                then    echo "You have mail."
                fi
        fi
        if [ -f /usr/bin/news ]
        then news -n
        fi
        if [ -r /tmp/changetape ]
        then    echo "\007\nChange backup tape."
                rm -f /tmp/changetape
        fi
   fi
   trap 1 2 3
umask 022

0
 
LVL 2

Expert Comment

by:JackOfAll1
ID: 13535182
I do not see a problem with the .profile.  I cut and pasted it in a new user I set up here and everything worked file.  

Did you check the /etc/profile?
0
 
LVL 2

Expert Comment

by:JackOfAll1
ID: 13535289
Also did you change the .profile to include the
set -x
set -v
and then signon?

What did it show?
0
 

Author Comment

by:booksplus
ID: 13535460
yep - The profile posted is from etc.  

I tried (in my personal profile)

set -x
set -v

but my personal profile executes all the
way through to the last echo statement -  then hangs until I type ctrl-c.

0
 
LVL 2

Accepted Solution

by:
JackOfAll1 earned 400 total points
ID: 13537045
I am not sure what to try next.  You have eliminated all of the common problems.

I would try.

renaming your .profile and signoff, signon and see if you still have the problem.  If you do the problem is in the /etc/profile if not it is in the .profile.  

After you determine what file the problem is in then I would comment out all the statements and then uncomment and try and repeat until I determine what statement is causing the problem.

I still believe that you have a process running.  It can be invoked from anywhere within the profile scripts or any scripts they invoke.  The fact that your echo at the bottom of your .profile is working does not mean that a process was not launched.  It only means that after a process was invoked the scripts continued.  

Sorry I can not give a direct answer.
   

 
0
 

Author Comment

by:booksplus
ID: 13537126
JackOfAll1 - thanks.  Appreciate your input.  I'll leave this open for  a day or two
more to see if there is any other input.  I'll close and award points after that.

Thanks!
0
 
LVL 38

Expert Comment

by:yuzh
ID: 13541074
you debug /etc/profile .profie, you can do:

set -x
. /etc/profile
. /home/booksplus/.profile

Note: there is a WHITE SPACE between the DOT and /
         have you checked  /var/adm/messagess file ?
0
 
LVL 3

Expert Comment

by:mike_mian
ID: 13541209
type alias  to see if any of the standard commands have been changed to something that might block/wait?
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 100 total points
ID: 13542231
please check if your profile hangs also using yuzh's suggestion http:#13541074
0
 

Author Comment

by:booksplus
ID: 13545067
yuzh - typing
set -x
. /etc/profile
. /home/booksplus/.profile

works fine.  By "works fine" I mean it does not hang.  I still hang upon login, but
after I type ctrl-c a few times and get a prompt, then your suggestion works.

There is no /var/adm/messages file.

alias yields the following
autoload=typeset -fu
false=let 0
functions=typeset -f
integer=typeset -i
rm=rm -i
stop=kill -STOP
type=whence -v
hash=alias -t -
history=fc -l
nohup=nohup
r=fc -e -
suspend=kill -STOP $$
true=:
0
 
LVL 21

Assisted Solution

by:tfewster
tfewster earned 100 total points
ID: 13547694
From the format of the .profile (& the reference to "VUE"); I'd guess that this is HP-UX - The system log will be /var/adm/syslog/syslog.log

If Ctrl-C works, that implies the .profile has finished (as the `traps` are no longer active)  - Tho' I can't see what "echo" commands you've put in to test where it is up to?

Please put a line `echo "ENVFILE"='$ENV` as the _last_ line in the .profile of one of the "problem" userids, to see if ksh executes another file after .profile is finished  (man ksh for more info on startup files)
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 300 total points
ID: 13550689
put:
set -x

as the first line of your .profile and login again, see where the login script hang.

BTW, which version of OS are you using, post the output of "uname -a".
     
0
 

Author Comment

by:booksplus
ID: 13551438
yuzh - I've done "set -x" and the weird thing is that the start up script runs
to the last line (last echo statement outputs successfully) but then hangs from
there.

HP-UX B.11.00 U 9000/800

I appreciate all the help - I'm going to close and split points tomorrow and
pass this problem off to another department.  THANKS
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 300 total points
ID: 13552019
Do you mean it run to the last line of /home/booksplus/.profile and than hang? that's weird!

when you type in Ctrl-C, and type in:
pwd

can you see your home dir?, if not, check your NFS mount.

PS: your /etc/profile is the default file from HP-UX.
0
 

Author Comment

by:booksplus
ID: 13552453
>when you type in Ctrl-C, and type in:
>pwd

Yes (I see my home prompt after typing ctrl-c a few times).
0
 
LVL 38

Expert Comment

by:yuzh
ID: 13552592
anything in /var/adm/syslog/syslog.log ?
0
 

Author Comment

by:booksplus
ID: 13552640
yuzh - no errors - I'll add a solution if I find anything in house.  THANKS everyone.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 13552735
in http:#13534286 you posted /etc/profile, can you please post you  /home/booksplus/.profile too
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question