LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-11-2010, 07:34 PM   #1
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Rep: Reputation: 17
Exclamation pkill -KILL -u root ...... is that bad???


Houston, we have a problem!

I was remoted into the server last night and was using new commands to test them out, and used the pkill command to log out all users, including root. I did this because I forgot to logout of root on my server and wanted to do it remotely (the server has no monitor hooked to it at the moment, and is plugged in somewhere else)
Since I had two root users logged in and wanted to log out the server's login and remote root user, I used the following command:

# pkill -KILL -u root


My terminal session using the ssh was immediately closed, and I went to bed.

Woke up today, and could not FTP in via FileZilla. Could not remote in like I have been via Putty (but it worked yesterday), and the sites are again loading VERY, VERY slow if at all. When I do a tracert externally from the LAN, the requests time out (im guessing on my end). I cannot even ping my server from inside the LAN, ssh from the LAN or externally.


What did I do here? lol!
__________________
 
Old 03-11-2010, 07:52 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
well you could just hit the reset button on the machine if you have physical access
edit
just tried that little stunt on a machine i was in front of and the results were NOT pretty
essentially you just killed everything running on your machine, gettys, your login manager, sshd, probably your network stack.. EVERYTHING maybe even the kernel so the only way to fix that is a physical reboot button

even init runs as root

Last edited by frieza; 03-11-2010 at 07:57 PM.
 
Old 03-11-2010, 07:55 PM   #3
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
Did that twice, no change =(

*EDIT*

I have a monitor and keyboard hooked up to it now in attempts to fix it, any ideas?

Last edited by KZeeSoft; 03-11-2010 at 07:56 PM.
 
Old 03-11-2010, 07:59 PM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
depends, maybe all it has to do is run fsck
see if you cant at least boot it into single user mode
 
Old 03-11-2010, 08:06 PM   #5
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
Rebooted it a few minutes ago, it seems to be hanging on "Checking Quotas..."

It finally came up, and only error I see in the startup is

"Not starting internet superserver: no services enabled"

Could it be that it will not start unless a monitor or keyboard is attached??

Because now it seems to be OK
 
Old 03-11-2010, 08:22 PM   #6
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
OK, figured it out with your help =)

My BIOS was halting when no KB was attached,..... duh

So the issue I created at first was killing all the users, and somehow crippled my server for any logins via ssh. I dont really know how that is possible, but ill accept that as the answer.
When I rebooted the machine, it didn't come back up because of no KB attached. After I attached it and rebooted, now I can remote in, FTP in etc.

Even though I learn things the hard way, it sure is a good way to remember them!

=)
 
Old 03-11-2010, 08:46 PM   #7
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
as i was saying earlier
most of the daemons (ftpd, sshd, even the master process init) run as root, so killing everything running as user root effectively kills the system entirely, basically you effectively crashed your server by doing that

trust me i've done worse
eg, rm -f /etc/rc.d and /etc/init.d as root

oops

Last edited by frieza; 03-11-2010 at 08:49 PM.
 
Old 03-13-2010, 10:17 AM   #8
KZeeSoft
Member
 
Registered: Mar 2010
Location: MD, USA
Distribution: Debian Lenny 5.0.4
Posts: 40

Original Poster
Rep: Reputation: 17
Thank you Frieza!

On another funny note, I did something like that to my macbook pro one day. I was having some MySQL issues with the RoR app I was developing, and wanted to reinstall it. I was following a guide, and forgot to enter the directory in the library folder, so I deleted my entire library >.<

Needless to say, all my icons in the dock changed to "?"s, and I had to reinstall OSX from scratch.

DOH!

lol
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Non root kill help LordRaiden Linux - Security 3 04-14-2009 01:52 PM
using pkill to kill a specific program after a certain time - help bcameron Linux - Newbie 3 12-07-2008 02:55 PM
LXer: Android: The Good, The Bad and That Pesky Kill Switch LXer Syndicated Linux News 0 10-17-2008 01:51 AM
when a process cann't be terminated through kill/skill/pkill/killall... Osirix Linux - Software 9 07-18-2006 11:16 PM
pkill ssh elohmrow Linux - Security 2 08-25-2005 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration