So I'm busy cleaning up our main box which hosts my works 3 main websites when I decide I want to get rid of postfix and start again, redo the whole mail side of things from scratch. This box runs FreeBSD 8.2 + Apache 2.2 Worker + PHP + Postfix + MySQL + IPFW and I think that's it....
I'm about to cleanup when I get a phone call about an emergency meeting, I let them know I'll be there in a sec, i really wanted to get this server sorted. Rushing now, I run the following in a moment of madness:
instead of:
I didn't even notice until I saw a warning about MySQL and then I realised and poo'd my pants... I killed the process straight away - everything looked fine, all the sites were running, etc so I ran off to the meeting I was now a few minutes late for. When I got back I brought up a separate SSH to the box and went to ssh in - the public key auth no longer worked... I put in the password and still couldn't login... I looked across at my other session that was sudosh to root and thought what the heck(completely forgetting about earlier) and rebooted the box. Anyways the box comes back up, still no SSH, so I console to it in VMware and try login as root, I get in but it cant find bash so it logs me out. I rebooted into single user mode and sweet I can see all the users still, unfortunately they all use bash which is now gone dammit. So now I cant get onto this box and I don't know what to do, so here are my questions:
Cheers!
Mark
I'm about to cleanup when I get a phone call about an emergency meeting, I let them know I'll be there in a sec, i really wanted to get this server sorted. Rushing now, I run the following in a moment of madness:
# pkg_delete postfix/*
instead of:
# pkg_delete postfix\*
I didn't even notice until I saw a warning about MySQL and then I realised and poo'd my pants... I killed the process straight away - everything looked fine, all the sites were running, etc so I ran off to the meeting I was now a few minutes late for. When I got back I brought up a separate SSH to the box and went to ssh in - the public key auth no longer worked... I put in the password and still couldn't login... I looked across at my other session that was sudosh to root and thought what the heck(completely forgetting about earlier) and rebooted the box. Anyways the box comes back up, still no SSH, so I console to it in VMware and try login as root, I get in but it cant find bash so it logs me out. I rebooted into single user mode and sweet I can see all the users still, unfortunately they all use bash which is now gone dammit. So now I cant get onto this box and I don't know what to do, so here are my questions:
- I noticed /var and /home (is in var) were both empty when booted into single user mode - have I somehow deleted all the files? Or does it just not mount /var[/fi;le] in single user? The files are the most important at this stage...
[*]What's the recommended course of action from here? With linux i would boot to a live cd change /etc/passwd so that root uses /bin/sh and then reboot, install what I need and copy off all the files before re-evaluating... Can I do this with BSD? What live-cd should I use?
[*]Am I better off just getting the files off the box and then moving to a new box with a clean install? Or rebuilding this one?
[*]Do you think there is any way of recovering the mysql databases?
[*]Any tips? ARRGGHH I'm so worried!
Cheers!
Mark