Terminal hangs at login occasionally

Hi,
So this has now happened twice. When opening a new terminal window, or new tab, the terminal will just hang at the 'login' process. It will never actually present a prompt. Quitting terminal and restarting did no good. Also, perhaps related, I had to do a hard shutdown, as it hung during the restart process.

Have you made any recent changes to your shell's initialization scripts?
try cranking up the verbosity, typically by using something like: 'set -xv'
Which file to use depends on if you're using a login shell or not.
if login shell add it to one of these files:
~/.bash_profile, ~/.bash_login, or ~/.profile
if not a login shell add it to the ~/.bashrc file.
for example
$ head .profile
#!/bin/bash
set -xv
Then just start another Terminal.app session. Watch for where it hangs.

Similar Messages

  • Terminal command to login a user

    I'm doing some work on a lab, and it part of the process involves logging out the user. To complete the installation, I need to log back in as the user. ARD let's let send a command to log out a user, but is there a terminal command to login a user? I've tried using login -f username, but that didn't work.

    To login as administrator:hello
    I use:
    osascript <<EOF
    tell application "System Events"
    keystroke "administrator"
    keystroke tab
    delay 0.5
    keystroke "hello"
    delay 0.5
    keystroke return
    keystroke return
    end tell
    EOF
    You can save it as a task and double-click and drag in the computers and run when you want to do it.

  • Audigy 2: Windows XP hang at login after new drivers instal

    Hi All,
    I have found that after installing the latest version of the Audigy 2 drivers (<span class="Apple-style-span">SBAX_PCDRV_LB_2_8_000) on my Windows XP SP2, sound works just before you reboot after installation. After the installation reboot, and after you enter your password at the login screen, you hear the logon-sound, and after that XP freezes.
    I have booted into Safe mode and disabled all startup items, and Windows then boots normally. However, when I try to narrow down the fault by selecti'vely re-enabling some of the Startup items, it then hangs again (no matter which ones I enable).
    So far, the only successful startup config consists of only the CT startup items being enabled.
    If I enable ANYTHING (even a single different item each time) else Windows hangs again.
    The only solution is to select "Restore last good known configuration" before Windows boots up. Undoing the driver installation using System restore, does NOT help.
    Anyone with any ideas?
    Thanks?

    UPDATE: Just updated to SP3 and guess what? Windows hangs at login as before, despite the fact that I was using the older, up to now fully working, drivers.
    Solution? Simple! Throw the card in the bin, and enable the onboard soundcard. END of problems! These people at Creative are completely USELESS...Not wasting any more of my time on their crappy products (and programming).
    ++?
    Hi there,
    Thanks for the reply; I have already gone back to?<span class="Apple-style-span">SBAX_WBUP2_LB_2_09_006<span class="Apple-style-span">?which seems to be working OK.
    The point is however that part of the new release does not work, and I am convinced that it is related to some 'helper' application and not the main driver itself.
    Anyone else having similar trouble?
    Thanks?
    Message Edited by lordbyte on 08-02-2008 02:04 PM

  • Mysql hang on login

    Hopefully I've done my research on this one.
    I've got the latest OMW - 9.2.0.1.2 with the mysql plugin with the same version number.
    I've having a hang on connect to the mysql database as described here:
    MySQL conversion: can't connect to mysql server
    and here: MIgration Workbench hangs at login procedure to MySQL
    My root password is 8 characters, and I've downloaded the mysql driver version 1.2a and put it in %ORA_HOME%\Omwb\drivers\ but still get the problem.
    Is this connect problem still a known issue? What about the release notes referred to in the above posts - I imagine that the web sites have changed since then, because I can find no links.
    Anyone got any ideas?
    Thanks,
    Alistair

    Hi Alistair,
    it appears that you have followed the correct procedure to avoid this problem. In addition, can you check that the machine you have the Migration Workbench installed on has access rights to your MySQL server. If your Migration Workbench machine does not have access then it can lead to this problem.
    If the problem persists, could you send a description of the problem along with a copy of the error.log file, which can be found in your %OMWB_HOME%\Logs, to our support team at the following address please : [email protected]
    I will raise the issue of the the link to the MySQL driver web-sites being changed. Thany you for pointing this out.
    I hope this helps,
    To

  • Macbook pro stuck/hangs at login screen ??

    Macbook pro stuck/hangs at login screen and no any controls while i restart last time..3 days before i found many solutions but no one is perfect like PRAM/SCM format command option+p+r and other many but no any perfect solution which can fixed my issue..please help me asap i am so much upset for that coz i am developer and there is many of the data ,  i also run windows on it win 7 so now i am running with that  i have latest 2011 mac OSX 10.7.5 with Core i5 ,4GB, 320 GB so please help me to resolve this issue i am waiting thanks in advan
    Regards,
    Muneeb
    Developer
    <Email Edited by Host>

    Macbook pro stuck/hangs at login screen and no any controls while i restart last time..3 days before i found many solutions but no one is perfect like PRAM/SCM format command option+p+r and other many but no any perfect solution which can fixed my issue..please help me asap i am so much upset for that coz i am developer and there is many of the data ,  i also run windows on it win 7 so now i am running with that  i have latest 2011 mac OSX 10.7.5 with Core i5 ,4GB, 320 GB so please help me to resolve this issue i am waiting thanks in advan
    Regards,
    Muneeb
    Developer
    <Email Edited by Host>

  • Emac hangs at login, valid passwords no longer work

    My daughter's emac, running 10.4.8, hangs at login during startup. Just the spinning disc. I started up from the original disc and used disk utility to repair disk and repair permissions. Starting up in Safe Boot mode i get as far as the password prompt but when the correct passwords are entered the screen image shimmies back and forth. I have reset the passwords using the startup disk and it continues to happen. I know that the passwords are reset becuse the new prompt shows up.
    Any help would be appreciated.
    AD

    That question has come up before bout that Knowledge Base article; all of the tips and suggestions in that remain valid under 10.4 (I suspect the article was retitled when Tiger first came out, in anticipitation of a never-needed Tiger version of the same article).
    Would you know if anyone had been playing around with keyboard inputs in System Preferences? That's a 'gotcha' where if someone is playing around with the settings and decides to set say Dvork keyboard as the input method, normal Roman keyboard keystrokes will be putting out the wrong characters. (That happened on one lab Mac once; after figuring out the problem, I used a Dvork keyboard map to translate the desired password into Dvork-equivalant keystrokes.)

  • Running Terminal Commands at Login

    Hi everyone!
    Just a quick question for anyone who may know the answer. I am trying to automatically run two terminal commands at login:
    sudo pmset -a halfdim 0
    sudo pmset -a halfdim 1
    I have absolutely no idea what I am doing, so if someone knows and can help me out, that would be great! Thanks a lot!
    ~ Philip

    Trying to make the screen wink at you when you login?
    You could install Platypus and create a little shell script with it and put it in your Login items. The script would be something like
    <pre class=command>sleep 30; sudo pmset -a halfdim 0; sleep 0.2; sudo pmset -a halfdim 1</pre>
    Those sleeps should be tweaked for the best effect. If sudo prompts you for a password, then it won't work.
    Message was edited by: jarik
    Hey man, check out the day we registered here!

  • Stuck in "loop" or "hang" after login

    Running a MacBook Pro with 10.5.4 and Filevault on (company policy, so turning it off isn't an option). Sometimes after I start up the computer I will get to the logon screen enter my password and the computer will hang. The background doesn't change to my user backgrounds and I need to do a hard reset.
    I've tried disk repair, permissions repair, running fsck -fy in single user mode, amongst other things. Some other suggestions, like deleting preferences files don't work because FileVault is enabled.
    Thoughts on other things to try?

    I just had this problem and couldn't find a solution online, so for the record (I'm presuming it's too late for you) here is what worked for me.
    First the symptom: upon booting I could get to the login screen with no issues. I could login to accounts that didn't have filevault enabled, but not the account with it (it would hang after login, never changing to my desktop background).
    First workaround: Logged in as root and manually opened the username.sparsebundle file (under Users/.username), using the FileVault password. At this point I could see that all the files were intact, and access them. Then I got a warning from Sophos Antivirus that a file needed to be moved to the infected folder and I had to enter a password for it. After that, login worked fine. But after the next logout I had the same problem.
    Final workaround: Turning off Sophos (not just the moving of files but also active scanning) solved the problem. Best guess is that Sophos is trying to move files before login and doesn't have the permission to move them to the right place but you can't see that it's needing that feedback so it just stalls indefinitely.
    I note that another user with this problem also had Sophos installed (see topic "Can't login after enabling FileVault"). I only had the problem after transferring a bunch of old email to my machine (with windows viruses in some of the attachments). Of course these caused my mac no threat, but this combined with the need for a password for file movement triggered the weird behavior.

  • What is advantage of opening a terminal as a login shell?

    In many websites/tutorials I see that a lot of people like to open the terminal as a login shell. Is there any particular reason or advantage to do so?

    There are a few settings you'd definitely want to only apply once, such as additions to your PATH. If, for example, you add
    export PATH="~/bin:$PATH"
    to your ~/.bashrc, the new directory would get appended for any additional login shell you start from within your shell.
    As a hands-on example: I'm opening a terminal, so ~/.bashrc is sourced for the first time. Then I'm starting ranger, a console file manager. From within ranger, I start a new subshell because I want to do some complicated task. Upon starting that subshell, my ~/.bashrc would be sourced for the second time, and my PATH variable would look like this:
    $ env
    PATH=/home/runiq/bin:/home/runiq/bin:<rest of PATH>
    This isn't exactly a major thing, but if you throw things in your ~/.(bash_)profile and ~/.bashrc willy-nilly, it will eventually come around to bite you in the ass.
    Edit: Some more examples:
    You want to start a certain kind of program only once: Put it in ~/.(bash_)profile.
    You want to define aliases: Put them in ~/.bashrc.
    A very specific example. You'd like to use the fish shell for all your interactive shells, but you can't just do "chsh -s /usr/bin/fish" because fish is not POSIX compatible. Put the following in your ~/.bashrc:
    exec /usr/bin/fish
    and this bit of black magic in your ~/.bash_profile:
    [[ $- == *i* ]] && source ~/.bashrc
    Hope that clears things up a little.
    Last edited by Runiq (2013-12-18 18:35:56)

  • Network User Login Hangs at 'loginwindow' Occasionally

    The client is a macbook pro (2012) with 10.8.5, the server is a mac mini also running 10.8.5 (w/ OSX Server).
    Network user logins usually work fine.  About 10% of the time, however, the loginwindow displays a spinning beachball endlessly after the name/password are supplied.  The workaround is to login to the client via ssh and 'kill -HUP' the user's loginwindow process; then the next login attempt will work.
    Examining logs, I find that the 2nd through 4th lines of the following sequence of messages appear on the client in the case of the above failure (in the case of a successful login, only the first line appears)...
        Apr 26 08:20:06 whbbook.local WindowServer[153]: Display 0x04248a6a: MappedDisplay Unit 2; ColorProfile { 2, "Thunderbolt Display"}; TransferFormula (1.000000, 1.000000, 1.000000)
        Apr 26 08:20:07 whbbook.local SystemUIServer[36439]: CGSCopyWindowShape: pid (36439) passed NULL window
        Apr 26 08:20:07 whbbook.local SystemUIServer[36439]: could not update menu bar region, 1000
        Apr 26 08:20:07 whbbook.local SystemUIServer[36439]: CGSSetWindowTransformAtPlacement: Singular matrix [0.000 0.000 0.000 0.000]
    Google reveals nothing helpful for the search phrase 'SystemUIServer CGSCopyWindowShape'.  I suspect the underlying cause of the symptom has to do with the fact that SystemUIServer ended up with a NULL window.
    I've already done the usual 'couurtesy' steps of a disk permission repair and a safe boot on both machines.
    Any interpretation of this, or recommendations?

    Check if this works :
    http://social.technet.microsoft.com/Forums/windows/en-US/452798be-30fb-4357-bd6f-827976e3637a/please-wait-for-the-user-profile-service-slow-logon?forum=winservergen
    Arnav Sharma | Facebook |
    Twitter Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members
    reading the thread.

  • Terminal hang on opening second tab

    hi,
    I hope this is the right forum.
    Since I upgraded to 10.5, my Terminal keeps crashing as I open a second tab or a new window. This doesn't always happen, but when it happens, this behaviour will continue until I reboot OS X. Then it may be gone for a while or, if I'm unlucky, not.
    As a power-terminal-user, this is very disturbing. It even happens with non-OsX-Terminals like iTerm or Terminator. On opening a second terminal window, there is no response from the window and according to top the terminal application I opened the second tab in has an average CPU usage of 99%.
    There is no .profile or something, I tried it with bash and zsh as a standard shell, there's no difference.
    Please, is there a solution?

    I am having this problem too, but only if I run a certain program that leaves a lot of hanging processes around. Other symptoms I noticed:
    * Many processes owned by root called "login". I see that there is one even when it's working normally, but I was getting something like 10.
    * Typing common commands ("ps") in an existing terminal window caused some sort of kernel-level loop that could not be killed.
    Even reboot hung, so I have been forced to power-down, twice so far.

  • Hangs on login

    I am new at this. First full year with a completely OSX environment (9 is finally gone from out site). I am sure I have some setups that could be wrong, but it is working pretty well so far. We have 800 students and I see about 350-400 students a day through the lab. We have 42 education intel imacs and the rest are PPC emacs. They are all running updated 10.4.8 sys software.
    For a few weeks I have been dealing with an occasional login where the name and password would dither and then hang there until we restarted. This may happen 10 times a day, but I figured with the amount of students that go through the lab that wasn't too bad. Well yesterday it got worse. Each period I would have 5-10 computers that on logon would go beyond the name and password, meaning that would disappear, then the computer would hang, with the blue desktop screen but nothing else. I waited a bit, but it seems the only resolve was to hold the power button and restart.
    Any idea as to why this is happening now, and what I can do to fix it. Thanks so much for your expert advice in advance.

    Has anybody got any further information on this issue?
    I am experiencing the same problem, I have a network of roughly 80 clients about 12 of which are Intel iMacs and the rest are PPC eMacs. I am using an XServe and XServe RAID to serve up the home directories.
    The issue started when I upgraded the network to 10.4.8, unfortunately this was a very similar time to when I added the first Intel Mac to the network so therefore I can not point my finger at the guilty party :0)
    I was advised by another Mac fanatic that it could possibly be due to font cache corruption so to try and isolate the problem I rolled out a little app that I found on the net called NHR http://jochsner.dyndns.org/NHR/Welcome.html
    What this basically does is stores all cache files for the network users on the client machine rather than in the Library/Caches folder in the users home directory. My assumption was that if font corruption was occurring then NHR would reduce it to set clients. Alas this is not the case! I reported the issue to Apple in early October and am still waiting for a resolve, good job I did not hold my breath! At the time I was told by the engineer that the issue is not a known 10.4.8 issue.
    Any more info or help is greatly appreciated!

  • When i open terminal i get (login(1685,0x7fff73770960) malloc: *** error for object 0x106d2c4d0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug  [Process completed])

    so all of a suddun i open terminal and i get
    login(1685,0x7fff73770960) malloc: *** error for object 0x106d2c4d0: pointer being freed was not allocated
    *** set a breakpoint in malloc_error_break to debug
    [Process completed]
    in the terminal window any help?

    Launch the Console application by entering the first few letters of its name into a Spotlight search, and look under "User Diagnostic Reports" for crash logs related to "login." Select the most recent one and post the contents -- the text, please, not a screenshot.

  • Terminal doesn't login

    Hello,
    I will write in a non-very correct english (I am italian) and I want to offer you my bigger thanks for the attention.
    I would want to use a certain phisyc-simulator that i found on the web (wich format is .exe), and so i've tried to get Wine, a free program that make you able to open .exe on OSX (in my case 10.5.8). Following the instruction for Wine's installation, I had to run a certain ./file but the wine installation wrote to me (in the terminal window) that this operation (the installation) can't be completed with the root user, but have to follow the same instruction with a secondary user.
    So, i've tried by first to do the same installation's step in the Guest user (the one in wich you can't save changes by logging out) but the terminal stayed empty for several minutes. I thought that the problem could be the use of the Guest user, so i've come back to the administrator one and i've created a secondary user (with no administrator "power") , but the terminal doesn't work neither here.
    Now, the terminal is still not working even with the ADMINISTRATOR user.
    Can someone help me?
    p.s.: i've some experiences with the terminal, by the need of compile and execute in fortran; it's not new;
            i've already searched online a way to solve this problem (for example i tried to see the Console's messages, and i tried to remove the file                             com.app.Terminal.preferences (or something like that) while logged white the secondary user (but not the Guest one))

    Thank you BobHarris you are very nice.
              -I've tried to delete the come.apple.Terminal.plist in the admin. account   -----> doesn't work  [does it exists in each accounts or is it just one for all?]
              -iTerm2 doesn't work
              -Installing Onyx and browsing to find the hidden files you told me ( .profile , .bash_login   etc...etc..) THE FINDER GAVE UP WORK!!!
    Even by cmd+rightclick on finder icon to click on re-open (traslated by italian "riapri") i had the error message 101800 or something like that.
    I solved the problem by switching off the Mac with the button... Once turned-on again the Mac ( it was a moment full of pain ), all worked fine.
    After had verified that the computer didn't had big problems after the trouble with the finder, i continued to search the hidden files.
    They don't exist in my Mac but LUCKILY i had the impression that execute the login file in   /usr/bin     could be the solution: it worked!!!!!!!
    I had this idea because of that the problem was just the login at the terminal....  A terminal window opened quickly and asked me with wich account I wanted to login... LUCKILY i wrote the good account_name and password and all gone fine!!! (the terminal works again)
    So,
    thanks to seventy one for the link http://www.davidbaumgold.com/tutorials/wine-mac/ (i think install Wine will not be a problem now)
    thanks to BobHarris too

  • Very slow boot and hanging after login.

    About 2 days ago I put my Mac to sleep by closing the lid. The next day, after waking it up and logging in, I opened Firefox. Then I got the beachbubble which lasted for awhile but then firefox opened. Then I closed Firefox because the beachbubble had me worried, but after closing it I got another beachbubble. I held the power button on my macbook because the whole OS seemed locked up.
    Now whenever I boot, I stay at the apple logo screen for atleast 10 minutes, then when I finally reach login, whenever I click on something I get a beachbubble for awhile. If I do login, it seems to hang at the default wallpaper screen, but I can move my mouse.
    I don't remember updating or installing anything that might cause problems like this, but I'd like to do a time machine restore back a couple days, however I can't get to my desktop.
    Thanks in advance.
    I did try resetting the PRAM and NVRAM, twice atleast, I tried Safe Boot, I tried Verbose and Single-User mode. With my experience I couldn't do much in either, however I did type"exit" in Single-User mode, and when "DSMOS has arrived.", nothing happened.
    Oh, and I can't boot with only power without the battery, because I have a non-removeable battery, atleast, only Apple is supposed to touch it.

    Restart the system from the SL disc you have. If you aren't sure how to do that put it into the DVD drive and restart the computer holding down the Option key, when it comes up choose the disc in the DVD drive. If it attempts to install let it until it gets to the choose language. Once you are on that screen then click the Utilities menu and choose Disk Utility. Once DU is running then choose the internal HD and look for the S.M.A.R.T status. If it says Verified that is a good sign, if it says anything else kiss the HD goodbye. I hope you have a good back up of your system because you will need to replace the internal HD. If the machine is still covered by warranty or AppleCare then contact Apple and arrange for a repair. If the S.M.A.R.T status says the internal HD is Verified then choose Repair Disk, you may have to run this numerous times for it to be repaired.

Maybe you are looking for