When I enter
who command in the shell, i got this:
root tty1 2017-04-01 12:21 langxiaowei pts/2 2017-07-21 18:05
So, for the safe, I want to kill the root user. Then I enter the comamnd in the shell:
sudo pkill -kill -t tty1
After, I enter who command again, I sure the root user is gone! But, a few seconds later, I lost connection from the machine. The host is not alive. The host restarted.
I saw the
last -x output, it's below:
runlevel (to lvl 2) 3.13.0-24-generi Fri Jul 21 18:10 - 00:45 (06:35) reboot system boot 3.13.0-24-generi Fri Jul 21 18:10 - 00:45 (06:35) shutdown system down 3.13.0-24-generi Fri Jul 21 18:06 - 18:10 (00:03) langxiao pts/2 10.15.1.15 Fri Jul 21 18:05 - down (00:00)
The syslog output is :
Jul 21 18:06:39 ubuntu kernel: [9611571.765277] init: mountall-shell main process (6462) killed by KILL signal Jul 21 18:06:40 ubuntu kernel: [9611571.879372] init: tty1 main process (1221) killed by HUP signal Jul 21 18:06:40 ubuntu kernel: [9611571.879387] init: tty1 main process ended, respawning
The Linux Version is :
Ubuntu 14.04 LTS \n \l
The kernel is :
Linux ubuntu 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
ps -ef|grep tty1, saw
/sbin/sulogin, perhaps there has relations. As I knew the comamnd
pkill -kill -t tty1 is safe, can not cause reboot host. But why here reboot?
I connected the host from remote on the secureCRT.
On Host B, I alse do
pkill -kill -t tty1, there is no reboot, and the syslog is :
Jul 21 18:04:34 ubuntu kernel: [32147390.433895] init: tty1 main process (997) killed by KILL signal Jul 21 18:04:34 ubuntu kernel: [32147390.433917] init: tty1 main process ended, respawning