cancel
Showing results for 
Search instead for 
Did you mean: 
Ksahil
Flight Engineer
Flight Engineer
  • 8,839 Views

How to know the which user reboot Linux server?

Jump to solution
 
0 Kudos
2 Solutions

Accepted Solutions
gdr
Mission Specialist
Mission Specialist
  • 8,800 Views

Hello, 

To reboot a system is needed a privileged user.

It's possible to collect information from different source.

with the command last, you can see who was logged in the system and when the server was rebooted.

$ last

Addiitonal information with:

$ man last

If the reboot was performed with a sudo user, and you have the journalctl persistent storage enabled on the system, with the journalctl you can find the entry:

$ journalctl |grep reboot

Jul 28 06:59:48 rhel86 sudo[1816]: admin : TTY=pts/0 ; PWD=/var/log ; USER=root ; COMMAND=/bin/systemctl reboot

In the entry there are information about the reboot phases.

Best regards

 

 

 

View solution in original post

Stephen_Adams
Flight Engineer
Flight Engineer
  • 8,785 Views

word. As typical in all linux, there are multiple ways to do anything and almost everything. Great job outlining multiple solutions.

View solution in original post

4 Replies
gdr
Mission Specialist
Mission Specialist
  • 8,801 Views

Hello, 

To reboot a system is needed a privileged user.

It's possible to collect information from different source.

with the command last, you can see who was logged in the system and when the server was rebooted.

$ last

Addiitonal information with:

$ man last

If the reboot was performed with a sudo user, and you have the journalctl persistent storage enabled on the system, with the journalctl you can find the entry:

$ journalctl |grep reboot

Jul 28 06:59:48 rhel86 sudo[1816]: admin : TTY=pts/0 ; PWD=/var/log ; USER=root ; COMMAND=/bin/systemctl reboot

In the entry there are information about the reboot phases.

Best regards

 

 

 

Stephen_Adams
Flight Engineer
Flight Engineer
  • 8,786 Views

word. As typical in all linux, there are multiple ways to do anything and almost everything. Great job outlining multiple solutions.

Ksahil
Flight Engineer
Flight Engineer
  • 8,771 Views

I m new to Linux. you had given a great solution I learned new stuff or command because of you. Thank you so much !!

0 Kudos
Armann
Flight Engineer
Flight Engineer
  • 8,546 Views

Awesome, I didn't know about the last command. Always learning something new!

0 Kudos
Join the discussion
You must log in to join this conversation.