rrevilo - Jun 29, 2005 - 6:27 am
When I turn on my computer and the password screen comes up, for some reason I'm not getting my icon and username and password fields. What I am getting is an icon saying 'Other' with a username and password field. Having not set up up 'Other' I have no idea what this is, i've tried all usual passwords etc to no avail.
I tried the installing disc and tried to reset the password but I get a message saying that I don't have permisson/priviledges to do this or there has been a failure of some sort.
So I can't get into my mac.
Is there any other way of bypassing this screen or is there a set password and username that mac use to access locked computers?
I don't want to install OS X again or put in the three Software discs as it will delete all my files.
Though I could install a new OS X and save the old one - will doing this delete my files or save them somewhere?
Any suggestions - I'm desperate.
Thanks for any help.
marcusr - Jun 29, 2005 - 9:03 am
Hi Olly,
It sounds like your login and network preferences have been corrupted somehow - the 'Other' option usually appears when you are doing a net boot, and want to log into a network account rather than a user account.
Do you have another Mac with firewire? If so, you can access your files to back them up by booting the machine and holding down the T key. This boots into Firewire Target mode, and you can then connect your machine to another Mac, where it will behave like a Firewire drive, letting you copy the data off. If at all possible, do make a copy of your data first, just in case!
The next thing to try would be to reset the permissions on the disc. If you boot off your install CD, once it gets to the first menu, select Disk Utility from the File menu.
Then select your main hard drive, and use the repair permissions option. This will reset all the file permissions on the drive back to what they should be. When it is finished, try rebooting and logging in again.
Finally, you could re-install the operating system. The option you are looking for is "Archive and Install". This makes an archive copy of your existing installation, along with all your data and settings, and then installs a new copy of the operating system, and then copies your existing settings and applications over.
When you are installing, look for the "Options" button, which will let you choose the Archive and Install. Don't proceed with the re-install until you are sure you have chosen this option, otherwise the install will wipe out your data.
Reinstalling should be completely safe for all your data, but if possible, it would be best to make a backup of your data first. There might also be more disk problems, and re-installing the operating system might make this worse.
Please let me know how you get on.
Marcus
rrevilo - Jun 29, 2005 - 12:56 pm
Marcus,
Thank you for your reply...I will try all of the above and let you know as soon as.
Olly
rrevilo - Jun 30, 2005 - 5:44 am
Marcus,
Right this is what I tried last night.
I tried verifying and resetting the permissions from the install CD, twice. No joy. Still had the same loggin in issue.
The message I get when I try to change the password is:-
'The password you entered has not been saved for the user xxxxx. You may not have permission to edit this disk or a general failure has occured'.
So I also ran a hardware check from a different Mac CD - it said everything was fine. So it's probably not a general failure.
When I was trying to reset my password I noticed there were two other options to change:
The root password
and sshd privilege separation (sshd) password
I tried changing the root password because clearly root has become enabled, but I received the same message as above.
I didn't try the sshd password.
If I were to re-install OS X and do an Archive/install would that solve my logging in problem?
If so, do you suggest that I also tick the 'Preserve users and Network settings' box? Wouldn't doing so continue my present problem?
If I were to do an Archive/install would the files that were on my desktop get deleted, or would everything be saved?
Thank you for your help mate, it's much appreciated.
Olly
marcusr - Jun 30, 2005 - 6:42 am
Hi Olly,
Can you tell me the version of OS X you are running?
You have a couple of options at the moment.
The most straightforward approach would be to do an Archive & Install and tick the 'Preserve users and Network settings' box.
Under Mac OSX all user data is stored in each user's individual folder (in the Users folder on the Macintosh HD). The archive and install with preserve selected keeps a copy of these folders, so everything in your iTunes folder, your desktop, etc. would be preserved. In fact it keeps a copy of the entire operating system in a folder, so you should be able to find everything.
I'm hoping that the re-install would replace whatever files have become corrupted, and then hopefully transfer across your user accounts. If it didn't, the next best case would be for it to allow you to create a new user, with which you could log in and copy all your data from the archive.
The second approach involved booting the machine into single user mode, and having you type commands through the text mode interface, but I don't know how comfortable you would be doing this?
Do you have another Mac around with Firewire? If so, you could be sure of backing up all your data by holding down the T key of the machine you can't log into when it boots, which puts it into Target firewire mode. You can then connect the machine via a firewire cable to another Mac, and the drive of your machine mounts on the other Mac's desktop, allowing you to copy all the data off. If this option is available to you, try this first, as then we're 100% certain not to lose any data.
So, at the moment, I'd recommend trying to backup files in Target mode first, if you can, and then just an archive & install with preserve settings, which hopefully will do the trick.
Let me know how you get on.
Marcus
rrevilo - Jun 30, 2005 - 7:46 am
Marcus,
Thanks for all that.
My version of OS is 10.2
As for a single user mode I'm not exactly literate with commmands but would be able to follow instructions.
Don't have another mac around so Firewire wouldn't be an option unfortunately.
I think the Archive and install would be the best option and then create a new user if need be.
Ta chap.
Olly
rrevilo - Jun 30, 2005 - 11:21 am
Just one more thing.
Speaking to someone else about this problem has flagged up an issue...
"'If I were to re-install OS X and do an Archive/install would that solve my logging in problem?'
Good question. Since you are having this problem when booted from the CD, you know that changing the password is not being blocked by any OS X software on the hard drive. Therefore it must be a file related to your login that is somehow corrupted."
What do you reckon. Will re-installing OS X have any effect on the login?
marcusr - Jun 30, 2005 - 11:35 am
Hi Olly,
It's a very good point. It is saying though that when it tries to access the files on your current installation, it's not succeeding. I think the problem is at the system level, rather than in your own user files.
My thinking is that doing a re-install will create a new set of system files. It might be the case that when it tries to copy over your old user, it fails because it can't find it, but it should at least let you create a new user account, and you can then log into your machine and copy your old data out of the archive.
Something you can try first is booting into single user mode and checking the user database.
First, you'll need to reboot into single-user mode. This boots your Mac into a text-only mode (you might be familiar with this experience if you've ever had to run fsck). You'll see instructions on how to run the file system check -- fsck -- and then a command prompt.
Enter the command mount -uw / so that we can make changes to the disk.
Next, you need to be able to access the users' accounts on your Mac, and we'll do that with NetInfo.
Start NetInfo by typing Systemstarter. You'll see a pile of messages appearing, which might seem familiar to you if you've ever watched the startup progress bar. When you see the message System started. and a stationary cursor, hit Return. You'll see the shell prompt appear again.
Now that NetInfo is running, we can look into the user database. Enter the command niutil -list . /users and hit Return, to see the names of the accounts on your Mac.
If that works, we can investigate setting up a new user or repairing an existing user.
Now type reboot and press Return once more to reboot your Mac.
Marcus
rrevilo - Jul 1, 2005 - 4:56 am
Morning Marcus,
I had a go at single user last night following your instructions. I got up to the bit where you said:-
"Now that NetInfo is running, we can look into the user database. Enter the command niutil -list . /users and hit Return, to see the names of the accounts on your Mac.
If that works, we can investigate setting up a new user or repairing an existing user."
I couldn't quite work out how to set up a new user so I hope you can help me with that.
When I entered 'niutil -list./users' I got a message saying:-
"insufficient number of arguements for -list"
But I also saw a list of stuff titled 'usage' and 'opts'.
Under opts there were things like:-
-t domain specified by /
-p prompt for password
-u user authenticate as another user
-P password password supplied on command line
-T timeout read and write timeout in seconds
-n numeric
-R retry
Make any sense?
Can I authenticate as another user?
I also did some research into Unix and found some code to change the root password by typing 'passwd root'.
However after typing in a new password and then verifying it I received this message underneath:-
'Net info write failed:Remote system error'
So I presume I'm stuffed!
Any thoughts or you'd like any other info, let me know and i'll try to help.
P.S.
should I do a code?:-
nidump passwd
and then write down the root accounts password hash?
(It sounds like i know what i'm taking about but i don't !!)
Thank you again for all your help mate.
olly
marcusr - Jul 1, 2005 - 5:11 am
Hi Olly,
You need an extra space in "niutil -list./users"
It should be
niutil -list ./users
This will (if it's working) bring up a list of users on your local machine.
If it succeeds, it will show the netinfo directory (where users are defined) is working, and we can then look to add users. If that fails, the netinfo directory is corrupt and doing an archive and install is the easiest way forward.
Marcus
marcusr - Jul 1, 2005 - 5:14 am
Olly,
Another command to try is
nidump passwd .
which will list a full set of user details for each user.
Marcus
rrevilo - Jul 1, 2005 - 12:54 pm
Marcus,
'If it succeeds, it will show the netinfo directory (where users are defined) is working, and we can then look to add users.'
Could you run me through how to add users?
Ta chap.
marcusr - Jul 1, 2005 - 1:41 pm
Hi Olly,
What was the output from the commands you ran? Did it show users?
There are a lot of commands to type. First, to create the user:
In the following, replace $first with a firstname, $epasswd with a password, $last with a last name. $uid should be a number, not already in use from the results you got from the listings. Make sure $first is different to your old username.
niutil -create . /users/$first
niutil -createprop . /users/$first name $first
niutil -createprop . /users/$first passwd "$epasswd"
niutil -createprop . /users/$first uid $uid
niutil -createprop . /users/$first gid 20
niutil -createprop . /users/$first home /Users/$first
niutil -createprop . /users/$first shell /bin/bash
niutil -createprop . /users/$first realname "$first $last"
niutil -createprop . /users/$first hint "Hint"
niutil -createprop . /users/$first sharedDir Public
niutil -createprop . /users/$first authentication_authority ";basic;"
niutil -createprop . /users/$first _shadow_passwd ""
niutil -createprop . /users/$first _writers_hint $first
niutil -createprop . /users/$first _writers_passwd $first
niutil -createprop . /users/$first _writers_tim_passwd $first
niutil -createprop . /users/$first _writers_picture $first
Once they have all run, you can try and add the user to the admin group:
niutil -appendprop . /groups/admin users "$first"
Then create a home directory
mkdir /Users/$first
chown -R ${first}:staff /Users/$first
Hopefully you can then reboot and log in as that user, and use the normal interface to create another admin user. Once that's done, you can copy all the contents of your old user's folders in /Users/old into the new user.
Give that a try and let me know how it goes.
rrevilo - Jul 4, 2005 - 4:34 am
Morning Marcus,
Ok the sh*t's really hit the fan now.
Last night having entered into single user mode and tried entering 'niutil -list ./users' I again got the message 'insufficient number of arguements for -list'
So I presumed that my netinfo directory is corrupt.
Researching into that problem I found some code from another forum which allows a user to trash the corrupted directory:-
cd /var/db/netinfo
mv local.nidb local.nidb.corrupted
reboot
Which I entered.
Hoping that on reboot mac OSX would notice the missing dir and create a blank one, which then i could add a root password to. Only i reckon i should have run fsck -y a few more times to get rid of any errors - because now when I start up the mac and get to the loading screen with the blue loading bar it stops completely and goes no further when it tries to find Netinfo - clearly because I dumped it. So now I can't even get past the loading screen to do anything.
Can I work around this problem?
Also now when I go into single user mode and type 'fsck -y'
I get a message saying volume check failed.
And running 'Systemstarter' works fine only until it tries to find netinfo, which it can't , so it just repeats ad infinitum -'waiting for netinfo'.
Have I seriously harmed my computer and my chances of fixing it now!?
Sorry to keep pestering you and asking for help!
Thanks
Olly
marcusr - Jul 4, 2005 - 5:19 am
Hi Olly,
You just missed a space in the command again, it should have been
niutil -list . /users
Note the space between the . and /users - the dot says this domain, and the /users is a directory.
I've not been in this territory before, but my best suggestion at the moment would be for you to boot back into single user mode and move the file you moved back into place ,
mount -uw /
cd /var/db/netinfo
mv local.nidb.corrupted local.nidb
umount /
reboot
Otherwise I'd recommend doing an archive and install now.
Marcus
rrevilo - Jul 4, 2005 - 7:20 am
Cool that sounds good. Thanks.
I take it putting in:
'mount -uw /
cd /var/db/netinfo
mv local.nidb.corrupted local.nidb
umount /
reboot'
will find the file I trashed?
'Cos once that's found i can continue with doing the archive install, something i should have probably done three days ago without messing around with code.
If I could buy you a beer i would.
Thanks again marcus.
I'll get back to you if my computer explodes or i come across another prob!
marcusr - Jul 4, 2005 - 8:41 am
Hi Olly,
Yes, the commands you typed previously renamed your local.nidb file to local.nidb.corrupted, so my suggestion just moves that file back to place.
If that works, then after rebooting, go back into single user mode, and try the commands again, looking out for the spaces between the commands.
Marcus
rrevilo - Jul 4, 2005 - 10:11 am
Cheers chap.
rrevilo - Jul 5, 2005 - 5:47 am
Marcus,
I think youre solution worked. Start up now completes.
However i may have typed something wrong because for some reason my Hard drive is 'unmounted'. I went to disk utility from the start up CD and tried doing the archive install - didn't work. So i went to first aid to check if everything was ok and i noticed that when i clicked on my Hard Drive symbol the message Hard drive 'Not mounted' appeared.
Have i turned it off or something? There must be some code that'll mount it again?
Can you help with my ongoing issues?!
marcusr - Jul 5, 2005 - 7:55 am
Hi Olly,
If the fsck -y from the command line was failing, it means the drive is in an unsafe state, and it needs to be repaired before it can be mounted.
If you boot off the install CD, and then from the first screen run Disk Utility from the File menu, in the first aid section you mention above there should be an option to repair the disk (not the permissions). Try running that, and then the disk utility should let you mount the disk, by clicking on the Mount button.
rrevilo - Jul 5, 2005 - 10:07 am
yeah i tried that last night, verify and then repair. I get a message syaing that disk is repaired. But when i then try to install i get a message saying installation error try again. And when i go back to the disk utility the HD is unmounted again.
Do you think i may need to buy Disk Warrior and try and fix the hard drive that way?
marcusr - Jul 5, 2005 - 11:10 am
Hi Olly,
Yes, at the moment I think Disk Warrior is your best option, to get the disk repaired back into a sensible state, from where you can either try adding a user again, or you can try a reinstall.