Stuck in BASH (Bourne-again Shell)!

I would appreciate if anyone offered any ideas how to fix my PowerBook G4 with OS X 10.3.7. In the middle of an update, the computer froze, and I restarted the machine. Now, after an extra-long boot up process, it loads up BASH (Bourne-again Shell), which, I understand to be, a UNIX shell. Commands like “exit” just bring up BASH again; restarting brings up the same scenario.
How can I get out of this loop and get back to my OS X? Any advice, comments, or suggestions on where to find help would be very much appreciated!
Thanks!
Eric

Eric
Good, you are able to log in at the prompt. I hope with an administrative account, but if not we'll worry about that later.
The system.log should indicate the cause of being unable to start up normally. You may want to print this post out, preferably in a largish mono-spaced font.
Type this carefully, spaces and punctuation are important:
tail -20 /var/log/system.log | moreNote the '|' ('pipe' symbol) is normally above the '\' on Apple keyboards. This command combination looks at the last 100 lines of your log.
You may see a "loginwindow[xxx] : exiting to console" message. The lines immediately above that will give the reason. Look especially for messages saying something like "login authorization failed", followed by a "AuthorizationRef doesn't have a username" message or something similar. A typical set of log entries would be:
loginwindow[281]: Login authorization failed (-60008)!
loginwindow[281]: AuthorizationRef doesn't have a username (<LoginAuthRefMgr: 0x44b60>)
loginwindow[281]: exiting to consoleIf this is the case, then take a look at this post, and follow the instructions carefully:
http://discussions.apple.com/message.jspa?messageID=1553062#1553062
The procedure there has worked for a lot of people.
If this is not applicable, post what you do see and I'll take a look tomorrow (1:30 am here!)

Similar Messages

  • What is happening about: The GNU Bourne Again Shell (Bash) is a command line utility widely used in many Unix-based operating systems including Linux and OS X.  Researchers have discovered a critical flaw in Bash which could allow remote code executi

    Authoritative advice today:
    The GNU Bourne Again Shell (Bash) is a command line utility widely used in many Unix-based operating systems including Linux and OS X.
    Researchers have discovered a critical flaw in Bash which could allow remote code execution by an unauthenticated user
    APPLE response?

    Also see:
    http://www.macrumors.com/2014/09/26/apple-os-x-users-safe-bash-flaw-update-soon/
    If you are not running a web server
    If you have not enabled CUPS web interface
    If you do not allow anonymous users to ssh into your Mac.
    If all are no, they you are not at risk.
    This IS a very serious bug for web servers, but the typical consumer Mac user is not at risk.

  • PAM doesn't like /usr/bin/bash set as shell

    Can anyone explain why PAM is fine with /usr/bin/zsh set as login shell but not /usr/bin/bash.  For bash it must be set to /bin/bash.
    Should I file a bug report?
    Here is an example https://bbs.archlinux.org/viewtopic.php?pid=1454302
    By default the archiso has /usr/bin/zsh set as the root login shell.  Line 10: https://projects.archlinux.org/archiso. … irootfs.sh

    qwerty12 wrote:I haven't bothered testing this hypothesis, but my guess is that it is because /etc/shells has entries for both /bin/zsh and /usr/bin/zsh but only /bin/bash for bash.
    To test your hypothesis, I added /usr/bin/bash to /etc/shells and changed the login shell. 
    I was still blocked by PAM from logging in with ssh.

  • Which .bash does "do shell script" commands use?

    The "do shell script" command uses the Bourne shell "sh". But I am curious to know which .bash it uses to define the shell environment variables.
    I ran into a problem installing a third-party unix program which required new environment variables to be defined in order to execute. Defining these variables and executing this program from the terminal worked fine.
    But executing it within a "do shell script" command in an Applescript - the program died silently because the environment variables it required were not defined in the shell Applescript uses. It appears to invoke a new shell which does not inherit the environment variables defined in your home user shell.
    (I found this out by 'do shell script "set"' which listed the environment variables Applescript knows about - the ones I defined for the third-party program were not listed).
    A "brute force" way of fixing this is to pass the environment variables directly:
    do shell script "export THIRDPARTY_ENVVAR=blah; /usr/sbin/thirdpartyprogam"
    This works but not exactly elegant, particularly when you need to pass a number of variables.
    So - any better ways to do this? Can I edit the .bash Applescript uses, and where is it?
    Thanks.

    Another option that might work for you... if you are saving/distributing your AppleScript as an "Application bundler" is to group all your shell env. variables and other commands into a separate shell script file. Then include the shell script inside your app bundle. Locate the shell script at runtime and run that with "do shell script".
    For example, create "myShellScript.sh"
    #!/bin/sh
    export THIRDPARTY_ENVVAR=blah
    # ... more variable declarations..
    /usr/sbin/thirdpartyprogam
    # ... more shell commands...
    Store the shell script file inside your AppleScript bundle's Contents -> Resources folder (remember to make the shell script executable). Then your AppleScript can find your shell script at runtime and execute it like this:
    set ssPath to quoted form of POSIX path of (path to resource "myShellScript.sh")
    set stdout to do shell script ssPath
    Steve

  • Bash completion and shell variables bug

    After a recent system upgrade, I noticed that bash completion of paths with shell variables is somewhat broken. For example:
    cd /
    cd $HOME/De<tab>
    #results
    cd \$HOME/Desktop<space>
    This definitely worked before, either instantly substituting the value of $HOME and then continuing to complete the directories as normal, or leaving the variable name form and completing the directories - I've seen both behaviors on different systems, but since they both worked fine for me I never cared to figure out why it would pick a particular behavior.
    But now, you'll notice that it knows I'm completing a directory, and completes one level, but then escapes the dollar sign so not even that expression works, and further adds a space instead of a forward slash on the end... if you delete the backslash and the space, and type a forward slash and part of another directory you'll get another completion, but then it breaks itself again the same way...
    By the way, I don't have bash_completion installed, I tried it after moving my .bashrc and "su - username" and ensuring the environment was clean, and I also moved the bash_completion.d directory out of paranoia, with no luck.
    Help?
    I guess I should just file a bug report with the bash project - it looks like the kinda completion you sometimes get to help you escape odd characters in filenames, for example
    touch 'odd[file'
    rm od<tab>
    # results
    rm odd\[file

    I just now decided to actually rebuild the bash package with this patch, and I was able to get it to work. I downloaded all the bash files from archlinux svn, I saved the patch as "completion.patch", and I added
    msg "applying patch ${srcdir}/completion.patch"
    patch -Np0 -i "${srcdir}/completion.patch"
    right after the patching loop in the PKGBUILD (and I added completion.patch to the source array and its md5sum to md5sums).
    Now having tried it, it's better than without the patch, but it's still not perfect - it adds a space after completing a folder in a path starting with a variable, instead of a slash, so to complete further path components you have to type backspace slash after each...

  • What funtionality comes from Terminal.app and not bash (or other shells)?

    I am planning to write an alternative terminal program ( --mostly-- for aesthetics sake) and I want to make sure I cover all of the functionality that I want from Terminal.app in my program. What I'd like to know is what functionality is attributable to the Terminal.app program and not the shell it is using.
    Message was edited by: Camden Jared Narzt

    You should find the ANSI Terminal Escape Sequence standard, which evolved out of the Digital Equipment Corporation VT100 line of terminals. Getting the escape sequences implemented correctly is the hard task.
    Roughly speaking, the Terminal handles displaying the characters from the process(s) and sending keyboard characters (again based on ANSI standard) to the process(s)).
    The Terminal also handles text selection, copy and paste.
    The Terminal may also send mouse movement and click information (optional).
    You could start with an existing terminal emulator, such as the open source project iTerm <http://iterm.sf.net>, or just contribute to the iTerm project.
    There are also X11 based terminal emulators such as xterm, rxvt, etc... where the source code is available.
    As with all open source code bases, if you start with that code, you are most likely obligated to make your source code available as well, unless you only use the resulting terminal emulator for your own use.
    I do NOT know where the official ANSI standard can be found, but this is from the DTTERM Common Desktop Environment man page
    <http://www.helsinki.fi/atk/unix/decmanuals/DOC_51/HTML/MAN/MAN5/0200___.HTM>
    and will give you a flavor for the kind of stuff you will need to implement.
    As for what bash implements, start by reading "man bash", then read man sh, man ksh, man tcsh, man zsh, and you will start to get a favor for what a shell does.
    For the most part the terminal displays the text and sends keyboard input. The shell runs programs, and command line editing, command line recall, etc... A lot of the commands that are run by the shell are just separate programs of their own, so they are not part of the shell.
    Message was edited by: BobHarris

  • Stuck "calculating changes."  Again.

    This is driving me crazy. It's the only problem I am having with my brand new Intel core i3 iMac. Time Machine chugs along smoothly for anywhere from a day to a week, then gets stuck seemingly forever "calculating changes." It has been calculating changes for four hours now. All the system log in Console shows is:
    Apr 3 06:44:36 macintosh-2 com.apple.backupd[5839]: Starting standard backup
    Apr 3 06:44:36 macintosh-2 com.apple.backupd[5839]: Backing up to: /Volumes/G-DRIVE Back-Up/Backups.backupdb
    Last successful backup was an hour before this. The computer was not even used between the end of the previous successful backup and the beginning of the stuck backup. So I have no idea what changed.
    If I try to stop the backup, the computer will freeze (beachball of death) so that only a hard restart will work. If I try to restart without touching the backup the computer will freeze (beachball again) and again, only a hard restart will work. If I leave it alone, the beachball will go for literally hours until I do the reboot. I've restarted this machine more in the last three weeks than I did on the previous machine in the past three years. I've done everything in Pondini's excellent troubleshooting guide. The only thing that seems to work at all is trashing the TM Preferences. Then I'll go along just fine for anywhere from a day to a week before the trouble starts again. I can't pinpoint any particular software or files, and have spent hours trying to do so.
    I'm at my wit's end and really don't want to harm the computer with all the hard restarts. I searched the forum but couldn't find anybody with this exact situation. Any thoughts from y'all would be greatly, greatly appreciated. -- Tom

    OK. Did everything like Linc said. At the end of verifying/repairing the TM drive in Safe Mode (there was nothing found wrong) the external drive went away. I got an error message stating that I had ejected the drive improperly. I did no such thing; the computer went immediately from the green "appears to be OK" to the "improperly ejected" window. Could not get the drive to appear on the desktop no matter what to try the backup in Safe Mode.
    Finally restarted the computer in my usual environment. No drive on the desktop. This time turning it off, reconnecting the cable, and turning the drive back on worked and it reappeared. Reconfigured Time Machine using the backup drive and ran a successful backup.
    Now we'll have to wait and see if it continues to back up, or if I hit the "calculating changes" snag again, in a day or six.

  • REFInd stuck but works using UEFI Shell v1 (but not v2) [FIXED]

    Hi,
    First ArchLinux install and it gets problematic. I've followed the Beginner's guide and am now in the following situation.
    rEFInd get stuck on:
    rEFInd - Booting OS
    Starting vmlinuz-arch.efi
    Using load options 'root=/dev/sda5 ro rootfstype=ext4 add_efi_memmap initrd=\EFI\arch\initramfs-arch.img'
    The \EFI\arch\refind_linux.conf contains the following line:
    "Boot" "root=/dev/sda5 ro rootfstype=ext4 add_efi_memmap initrd=\EFI\arch\initramfs-arch.img"
    Interestingly, when I start it from the UEFI shell (from the arch installation cd) it works with the v1 but not the v2 !?
    What did I overlook?
    edit: initrt was a typo… sorry.
    Last edited by greut (2013-03-27 18:10:53)

    greut wrote:
    srs5694 wrote:Second, try simplifying your command line. The "rootfstype=ext4 add_efi_memmap" options are probably unnecessary, so removing them (at least for testing) is desirable.
    Yep, I can boot using only:
    vmlinuz-arch.efi root=/dev/sda5 ro initrd=\EFI\arch\initramfs-arch.img
    But still, it works with the UEFI Shell v1 from the liveUSB but not using the shell v2 or via rEFInd directly.
    Is there any particular reason you need those options? If not, just leave them out and call it fixed. If you care to do more investigation, though, I'd be interested in knowing which of those two options is causing problems -- or perhaps if only the combination of both of them is causing problems. If either alone works but not both, then I'm inclined to suspect there's a problem with the length of the options line, although that seems odd, since I'm pretty sure I've tested with long options lines in the past with no sign of trouble.
    I also can't help but wonder if this might somehow be related to the problem being discussed in this thread, which also has a bug report here. That seems to be a problem with specific kernels, but it's conceivable that there's an interaction between kernels and some other unknown factor.
    FWIW, I just did a quick scan of the most relevant section of the rEFInd code and I didn't spot anything suspicious about how it's handling those strings. In fact, it's using allocated memory rather than fixed character arrays, so a hard limit caused by a string of length x seems to be unlikely as a cause unless it were in the kernel's EFI stub loader -- and then you wouldn't see the difference based on the boot manager type (EFI shell v.1 vs. EFI shell v.2 vs. rEFInd).

  • Stuck on apple screen again......

    i am so tired of apple. i don't even want this phone anymore. i have had this problem for the second time now, where my phone froze up and stays on the apple screen and doesn't do anything until the battery dies. the first time i reset it after receiving an answer to go into recovery mode on the phone and then connecting it to iTunes. this is the second time, and it so happens that i won't have my computer for four weeks while it's getting repaired. when did i send the computer in? YESTERDAY! and the computer i'm typing this on doesn't have any of my music or anything and doesn't have iTunes at all. this isn't my computer and my friend doesn't want me to download iTunes. so what is an alternative to this????? i'm assuming that i have to wait four weeks without a cell phone in order to fix this? and if you tell me that i have to go to the apple store, that's an absolute no either. the nearest apple store to me is never a quick in and out kind of thing because there are always tons of people there and the people couldn't even help me before because they were booked for the rest of the day. rarely am i ever able to even make it down to the apple store even if i have an extra 20 minutes because it'll take about an hour just to restore the phone. so if anybody so happens to have a miracle button i can push, it would be awesome to hear about. i don't mean to be so moody about this, but it's really frustrating to have to restore my phone twice within a month for the same problem. it'd be great if apple released a bug fix for this.

    by the way, i have the latest 2.0.2 update. which, i have noticed has been better on installing things, but not on battery life.

  • My mail is stuck in the outbox AGAIN

    Help, I have googled how to fix this problem and so far nothing has worked.  Will I need to go to Apple to fix this problem?

    Recheck that the settings in your mail software matches the needs of the mail server you are using.
    Somebody here may be able to help you if you let us know the following:
    Which mail software are you using? (the one supplied with your Mac? something you bought? which? some varety of webmail? which?)
    Which mail provider are you using? (Apple's iCloud? gmail? something at work? something your ISP provided?)

  • What is TERMINAL and BASH ? and why this shows in my Dock ?

    What is TERMINAL and BASH ? and why this shows in my Dock ?

    "What is Terminal and Bash?"
    Terminal is an application allowing access to the Mac's UNIX-based sub-system. If you like another operating system ticking away beneath OS X's shiny GUI. BASH (Bourne Again Shell) is one of many command line interpreters for that sub-system.
    ". . . why does this show in my Dock"
    Either because you put it there or you launched the application.

  • By default AIX limits maximum file size to 1GB

    When writing files larger than 1GB in AIX, I receive a "File too large" error.
    This file size limit presents a problem, especially when creating large files,
    such as LDIF exports from a Directory Server istance or message store dumps
    from a Messaging Server instance.
    <P>
    By default, AIX limits the maximum size of files to 1GB. However, root can
    adjust the maximum file size for itself with the following command:<BR>
    <P>
    $ulimit -f <I>arbitrary_large_number</I>
    <BR>
    <P>
    The -f modifier
    specifies the maximum file size. For example,<BR>
    <P>
    $ulimit -f 4194304
    <P>
    This values for the maximum size of files is set in the
    /etc/security/limits
    file. The default values in this file are as follows:<BR>
    <P>
    fsize = 2097151<BR>
    core = 2097151<BR>
    cpu = -1<BR>
    data = 262144<BR>
    rss = 65536<BR>
    stack = 65536<BR>
    nofiles = 2000<BR>
    <P>
    To view your local default values, use the following command:<BR>
    <P>
    $ulimit -a
    <P>
    Any user can adjust the maximum file size limit downward. For example,<BR>
    <P>
    $ulimit -f<BR>
    2097151<BR>
    $ulimit -f 100<BR>
    $ulimit -f<BR>
    100<BR>
    $cp /unix /tmp/MyBigFile #(copy a big file to another location with enough space)<BR>
    File too large<BR>
    $ls -al /tmp/MyBigFile<BR>
    -rwxr--r-- 1 UserID GroupID 51200 Jul 25 08:41 MyBigFile
    $
    <P>
    However, only root can adjust the ulimit
    file size limits upward. Such changes
    will take effect only after the user logs in again.
    <P>
    Additionally, it is possible to set specific user limits with the
    chuser command. For
    information on chuser,
    click the following URL:<BR>
    <P>
    http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds1/chuser.htm#A067913d9
    <P>
    For more information on the ulimit
    command, check the following URL:<BR>
    <P>
    http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds5/ulimit.htm
    <B>Note:</B><BR>
    The shell in use may affect the actual limits imposed by ulimit
    . In particular,
    /usr/csh may not
    properly adjust the limit from the default value. Also,
    bash (Bourne Again shell)
    may treat file sizes in blocks as though they were file sizes in kilobytes(KB).

    The size you can handle is not limited... only by your code :-)
    Check MemoryMappedFiles... i handle Gigabyte files with no problem ;-)

  • Bourne Shell (sh) - How To Interpret Characters Literally

    I know that character enclosed in single quotes are interpreted literally by the Bourne-Again SHell (bash). After all, the man page states:
    {quote}
    "Enclosing characters in single quotes preserves the literal value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash."
    {quote}
    Here's some proof:
    bash-3.2$ echo 'hello world'
    hello world
    bash-3.2$ echo 'hello
    world'
    hello
    world
    bash-3.2$ echo 'hello\world'
    hello\world
    Now I thought that the Bourne shell (sh) worked the same way, but obviously not:
    sh-3.2$ echo 'hello world'
    hello world
    sh-3.2$ echo 'hello
    world'
    hello
    world
    sh-3.2$ echo 'hello\world'
    helloworld
    How do I go about having the Bourne shell (sh) interpret my characters literally?

    What the reason you can't/don't want to use bash?
    On MacOSX and Linux, /bin/bash and /bin/sh are both GNU bash; the latter is just running in the sh-compatible mode. In this case, the following will work, but it won't work on BSD's and other Unixes, where /bin/sh is not GNU bash:
    sh$ shopt -u xpg_echo
    sh$ echo 'foo
    bar'
    foo
    bar
    The following also works; I don't know which is better (from the portability point of view):
    sh$ /bin/echo 'foo
    bar'
    foo
    bar

  • Bash vulnerability in Solaris 10

    http://seclists.org/oss-sec/2014/q3/650
    https://securityblog.redhat.com/2014/09/24/bash-specially-crafted-environment-variables-code-injection-attack/
    Any plans for a hotfix for bash on Solaris 10?
    $env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
    vulnerable
    this is a test
    SunOS hostname 5.10 Generic_150401-13 i86pc i386 i86pc
    $bash -version
    GNU bash, version 3.2.51(1)-release (i386-pc-solaris2.10)
    Copyright (C) 2007 Free Software Foundation, Inc.
    $pkginfo -l SUNWbash
       PKGINST:  SUNWbash
          NAME:  GNU Bourne-Again shell (bash)
      CATEGORY:  system
          ARCH:  i386
       VERSION:  11.10.0,REV=2005.01.08.01.09
       BASEDIR:  /
        VENDOR:  Oracle Corporation
          DESC:  GNU Bourne-Again shell (bash) version 3.2
        PSTAMP:  sfw10-patch-x20120813130538
      INSTDATE:  Aug 19 2014 07:23
       HOTLINE:  Please contact your local service provider
        STATUS:  completely installed
         FILES:        4 installed pathnames
                       2 shared pathnames
                       2 directories
                       1 executables
                    1250 blocks used (approx)

    Hard to say whether it's safer to wait or safer to patch it yourself in the meantime but, if like me you'd rather not wait an indefinite period of time for a patch, here is a patching process that's working for me:
    Found the newest GNU patch compiled for Solaris on Open CSW: bash - Solaris package
    To install, you'll want the CSW package utility. Here are some instructions, but I'll also go over it below: Getting started — OpenCSW 0.2014.04 documentation
    You may already have the CSW package utilities installed, check under "/opt/csw/bin" for "pkgutil". If it's not there, issue
    pkgadd -d http://get.opencsw.org/now
    Then, I like to add a symbolic link into /usr/bin to make it easier:
    sudo ln -s /opt/csw/bin/pkgutil /usr/bin/pkgutil
    Now we can do the install -- pkgutil is going to handle all the heavy lifting, dependency building etc., and place the new bash binary into "/opt/csw/bin"
    sudo pkgutil -U
    sudo pkgutil -a bash
    sudo pkgutil -i bash
    Follow the prompts, and then look under /opt/csw/bin for bash:
    ls /opt/csw/bin | grep bash
    If you see it listed there w/ a Sep 25th date (or later, if you're following these instructions in my future), then you're ready for the final step -- replacing the old bash binary with the new.
    We're going to replace /usr/bin/bash with a link to /opt/csw/bin/bash. I was worried this step would crash running processes and applications (weblogic, BI, db instances), but so far no issues -- that said, PLEASE be careful and shutdown anything you can first! I can't be sure this step will work w/o any hiccups every time.
    cd /usr/bin
    sudo cp bash bash-old
    sudo ln -f /opt/csw/bin/bash /usr/bin/bash
    You can see we backed up the old bash install (4.1), in case something goes wrong. When finished, issue that command and you should see an error message now:
    env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
    bash: warning: x: ignoring function definition attempt
    bash: error importing function definition for `x'
    this is a test
    Again, BE CAREFUL -- while I was figuring this out, I did take down a couple zones to the point where I couldn't SSH back into them.
    That said, the steps above are working flawlessly for me -- BUT I can't guarantee you'll have the same experience!

  • Unix shell isn't respecting my quotes around arguments

    When I run a program test in unix, I type in the shell:
    shell> java test "arg1 arg2 arg3" arg4
    My program should now have two arguments
    arg1 arg2 arg3
    ...and
    arg4
    Instead it has 4 arguments
    arg1
    arg2
    arg3
    arg4
    I tried single quotes and everything. Do you have any ideas?

    Quite.
    For example:
    public class Args {
       public static void main(String[] args) {
          System.out.println(args.length + " arguments received:");
          for( String s : args ) {
             System.out.println(s);
    }Input:
    java Args "arg1 arg2 arg3" arg4
    Output:
    2 arguments received:
    arg1 arg2 arg3
    arg4
    (edit) That's running under the Bourne Again Shell (bash) on Linux.

Maybe you are looking for

  • REPORT DOES NOT RUN CORRECTLY , URGENT PLEASE HELP

    Hi, I am trying to run a report from visul basic screen, but it does not run correctly. Here is how I am running the report. There is a screen developed in VB This screen prompts the user for user id and password. Once it gets that, it connects to th

  • HT1689 can i sync more than one device to one itunes account

    can i sync 2 iphones to the same itunes account?

  • Convert External HD from PC to Mac

    I have an external hard drive hooked up to a PC. I no longer use the PC and would like to use the external HD with this iMac. I have a feeling that it will not work because it's probably formated for the PC. How can I make it work with the iMac. Can

  • Workflow with images

    Hi all! I just got a Fuji Finepix S5600, who's RAW format isn't supported by OSX. So i'd like to create a worflow using automator, without success for now. 1 - Image tranfer : I get all the images (Jpegs or RAW (.RAF) downloaded to a folder. 2 - I wa

  • Production Confirmation cancellation issue

    Dear All, After Production Confirmation (101), stock is in QM and Insp Lot Status is REL. Still System is not allowing CO13 as well as CO11 with 102/262, saying "Change the inspection stock of <material> in QM only". Inspection Type: 04, 05 is activa