Deleted the 'login' file, now my Macbook won't get past the loading bar

Joined
Feb 17, 2019
Messages
5
Reaction score
0
Points
1
So recently I was fixing a (minor) issue that I unfortunately can't remember, and I found a solution online that told me to delete the 'login' file somewhere I believe in usr/local or some similar location. The post said that the OS will rebuild this file and therefore the issue I was having will be fixed. So I deleted the file, my Mac was working just fine, until I shut it down.
Now when I turn it on and enter my password, the loading bar reaches 100% but the Mac is stuck there and I can't get to the desktop. I tried waiting several hours, so I'm quite sure it's stuck. I tried the fixes online related to all kinds of boot issues, but those issues were always that people were stuck on the apple logo, not on the loading after entering their password.

What I have tried so far and hasn't worked:
  • Booting in safe mode
  • Resetting the NVRAM
  • Selecting bootable disk
  • Running the disk repair in the recovery mode
  • Reinstalling my macOS in the recovery mode


So is there any way to recover that login file or fix this issue in any way? Even if the fix would delete all my data, I'm fine with it, as I'm just really desperate to fix my Macbook.
Thanks in advance.
 
Last edited:

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Welcome to our forums.

Unless you made a backup that you can invoke, about the only way to get the system back up is to reinstall macOS. Boot to Recovery and reinstall macOS from there. Reinstalling that way preserves data and at the same time will restore your system to a usable state.
 
OP
D
Joined
Feb 17, 2019
Messages
5
Reaction score
0
Points
1
Thanks for your reply,

however, (as I mentioned in my original post), I tried reinstalling my macOS from the recovery, and it hasn't fixed my issue.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Thanks for your reply,

however, (as I mentioned in my original post), I tried reinstalling my macOS from the recovery, and it hasn't fixed my issue.

Looks like I missed that. However, that should have restored the system.

Okay, get back into Recovery and completely erase the drive. Then you will need to do an internet install of macOS. That will install the original version of macOS that the machine came with. Apparently, just reinstalling over the top of macOS does not restore those files which were deleted.

Going back over your original post, I'm wondering why the system even allowed you to remove that file? Usually critical files are protected by the system and would require using root privileges in order to delete them. Anyway, try the erase and install to see if that corrects the problem and allows you to boot normally.
 
Joined
May 21, 2012
Messages
10,703
Reaction score
1,158
Points
113
Location
Rhode Island
Your Mac's Specs
M1 Mac Studio, 11" iPad Pro 3rdGen, iPhone 13 ProMax, Watch S7, 2018 15" MBP, AirPods Pro
I have a feeling it is a "user" created file. And if you do't have a clone or a Time Machine backup, then you are out of luck.

You could do an erase/partition/format of the drive and reinstall the OS. But if you don't have a backup, then...

Edit: When you start up in Recovery, use Disk Utility to erase/format/wipe the drive, then use Reinstall macOS to use your MBP again.

https://support.apple.com/en-us/HT201314
 
Last edited:

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,596
Reaction score
1,072
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
Going back over your original post, I'm wondering why the system even allowed you to remove that file? Usually critical files are protected by the system and would require using root privileges in order to delete them. Anyway, try the erase and install to see if that corrects the problem and allows you to boot normally.
Good point. I didn't think of that when I read the post a bit ago.

Too bad we don't know what OS version is involved and what directions were being followed. That would tell us whether the System Integrity Protocol is involved and whether the he was asked to disable that.
 
OP
D
Joined
Feb 17, 2019
Messages
5
Reaction score
0
Points
1
Good point. I didn't think of that when I read the post a bit ago.

Too bad we don't know what OS version is involved and what directions were being followed. That would tell us whether the System Integrity Protocol is involved and whether the he was asked to disable that.

I'm on the latest version of Mojave. "System Integrity Protocol" does ring a bell so it's quite possible that I have disabled it, but I can't say for sure.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
The correct terminology is "System Integrity Protection" (SIP) and can only be turned off in Recovery Mode through Utilities, Terminal. I doubt you did that.

Did you do the erase and reinstall as has been suggested?
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,596
Reaction score
1,072
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
My bad Charlie. Didn't realize I called it the wrong thing till afterwards.

Turning off SIP from Terminal is easy if you have the directions. The OP would probably remember doing that but I can't think of another way the OS would allow removal of that file.
 
OP
D
Joined
Feb 17, 2019
Messages
5
Reaction score
0
Points
1
I never used the terminal in recovery mode, however I think it's quite likely I turned off the SIP from the terminal. I'll try erasing the disk and reinstalling once I get home today.
 
OP
D
Joined
Feb 17, 2019
Messages
5
Reaction score
0
Points
1
Erased the disk and then reinstalled the OS and everything is working just fine now.

Thanks to everybody who helped!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top