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

Powerbook G4, Mac OS X (10.3.7)

Posted on Aug 2, 2007 6:44 AM

Reply
20 replies

Aug 2, 2007 5:35 PM in response to ereek85

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 | more

Note 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 console

If 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!)

Aug 3, 2007 4:26 AM in response to ereek85

Eric

Does that mean that I don't have an administrative account?


Possibly, but it could also be that the permissions on the log are wrong.

First let's check who you are 🙂

id

Assuming your short name is "ewarren" you should see something like:

uid=501(ewarren) gid=501(ewarren) groups=501(ewarren), 81(appserveradm), 79(appserverusr), 80(admin)

The important one for this exercise is the last, group 80.

If you are listed as a member of the admin group (80) then try this:

sudo tail -20 /var/log/system.log | more

When you press return, you will be prompted for your password. This is not echoed for security reasons: just type it and press return again.

If this is OK, proceed as before, but post back in either case.

Aug 6, 2007 5:45 AM in response to ereek85

Eric

Well, your account doesn't have admin privileges 😟

Let's see if you have any admin account:

Copy and paste the following into the Terminal window followed by a return:

nireport . /groups name gid users | egrep "^admin"

Copy and paste the result from the Terminal window to a post here.

If the only listed user is root, you can get back admin privileges for your own account by following the steps in this User Tip: I lost my admin user.

Post back with details, and we'll take it from there.

Aug 6, 2007 11:59 AM in response to Michael Conniff

Michael,

I was able to access my admin account (it turns out that I was entering the wrong login name), after which I followed the directions above, typing "tail -20 /var/log/system.log | more". The last three entries were:

*loginwindow[359]: Login authorization failed (-60008)!*
*loginwindow[359]: AuthorizationRef doesn't have a username (<LoginAuthRefMgr: 0x447530>).*
*loginwindow[359]: exiting to console*

I followed your link, and when I entered "/sbin/fsck -y", nothing happened-- only the command prompt popped back up. After reentering it several dozen times, I moved onto the next step, typing "/sbin/mount -uw /". But it returned:

*mount_hfs: Operation not permitted*

After that didn't work a few times, I retyped the command without the final "/". The computer returned:

*/dev/disk0s3 on / (local, journaled)*
*devfs on /dev (local)*
*fdesc on /dev (union)*
*<volfs> on /.vol*
*automount -nsl [259] on /Network (automounted)*
*automount -fstab [262] on /automount/Servers (automounted)*
*automount -static [262] on /automount/statis (automounted)*

Then, I typed "cd /var/db/netinfo", followed by "mv local.nidb/ local.nidb.bad". The computer returned:

*mv: rename local.nidb/ to local.nidb.bad: Permission denied*

It looks like I am stuck again. Please let me know what to do next. Thanks so much,

Eric

Aug 6, 2007 3:04 PM in response to ereek85

Eric

OK, sorry about that link. Firstly the fsck command in that particular post is not quite right, but secondly it may not have emphasised enough that you must be in Single User Mode to do this. In Single User Mode you are effectively root, and should never see a "Operation not permitted" or " Permission denied" message (it can happen, but that's another story).

Here is a better link, to essentially the same thing, that I posted just yesterday. Make sure you start in Single User Mode (the post tells you how).

Let me know how it goes.

Aug 6, 2007 4:04 PM in response to ereek85

Eric

been spinning on and off for about 10 minutes


Well I think I might wait a bit longer than 10 minutes, but obviously you don't want to wait forever. Presumably you haven't yet got as far as the Setup Assistant?

It's over half an hour now, if it is still going. I would shut down with the power switch, wait a minute, then restart in Single User Mode and repeat the whole thing. The /sbin/fsck -fy is even more important now, since you've forced shutdown, and may in fact make some minor repairs, in which case you should repeat it.

It may complain at the mv -f local.nidb/ local.nidb.bad command, asking you if you want to overwrite the file, so maybe it would be easier to just make that mv -f local.nidb/ local.nidb.bad2 to avoid that complication. But if you did things right before, there is no need to repeat the ls -ln /Users command, since that won't have changed.

It may be tomorrow before I check again …

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Stuck in BASH (Bourne-again Shell)!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.