You are Here:
Linux Lite 4.8 Final is now available for download and installation



[ SOLVED ] Check other users sudo

Author (Read 2201 times)

0 Members and 1 Guest are viewing this topic.

Check other users sudo
« on: February 13, 2016, 07:08:00 AM »
 

liamjake05

  • Forum Regular
  • ***
  • 100
    Posts
  • Country: mt
  • Reputation: 3

  • Linux Lite: 4.6 64bit

  • MEMORY: 4Gb
Anybody knows how to check if other users not in the sudo group are trying to gain access. When my brother which is not in the sudo group runs a sudo command in  terminal it will say that it will be reported to me. An an example of what it does is in a picture below. Anybody knows how to check?
Last Edit: February 17, 2016, 02:17:28 PM by liamjake05
 


Re: Check other users sudo
« Reply #1 on: February 13, 2016, 09:10:58 AM »
 

torreydale

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1531
    Posts
  • Country: us
  • Reputation: 253
  • * Forum Moderator *

  • Linux Lite: 4.8 64bit

  • CPU: Intel Core i5-5300U (-HT-MCP-)

  • MEMORY: 8Gb

  • VIDEO CARD: Intel Broadwell-U Integrated Graphics

  • Kernel: 4.x
It looks like it goes to /var/log/auth.log
Want to thank me?  Click my [Thank] link.
 

Re: Check other users sudo
« Reply #2 on: February 13, 2016, 12:19:56 PM »
 

liamjake05

  • Forum Regular
  • ***
  • 100
    Posts
  • Country: mt
  • Reputation: 3

  • Linux Lite: 4.6 64bit

  • MEMORY: 4Gb
did not work
 

Re: Check other users sudo
« Reply #3 on: February 13, 2016, 01:15:00 PM »
 

Wirezfree

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1484
    Posts
  • Country: gb
  • Reputation: 404
  • Linux Lite "Advocate"

  • Linux Lite: 2.8 64bit

  • CPU: i7-4790S

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD4600 (Integrated)
ave you logged into "your" account and checked /var/log/auth.log
????
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks :)

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
 

Re: Check other users sudo
« Reply #4 on: February 16, 2016, 10:02:58 AM »
 

shaggytwodope

  • Forum Regular
  • ***
  • 222
    Posts
  • Reputation: 44
  • Linux Lite Member
    • Shaggy's Blog

  • CPU: Intel i5 4440

  • MEMORY: 8Gb

  • VIDEO CARD: Intel HD Graphics 4600
Anybody knows how to check if other users not in the sudo group are trying to gain access. When my brother which is not in the sudo group runs a sudo command in  terminal it will say that it will be reported to me. An an example of what it does is in a picture below. Anybody knows how to check?

It's much more ideal to run

Code: [Select]
sudo visudo
and add the line

Code: [Select]
Defaults    logfile=/var/log/sudo.log

This will only show sudo issues, and not garble it up with other system info. This is all ran as the "admin" of course. To view the log, you'll need to have access permison (you might wanna look into groups and permissions on your own).


To do this just run


Code: [Select]
sudo cat /var/log/sudo.log

Again with the "admin" account.






That all aside, using the auth.log file also shows you login attempts and other info you may want to check often. You do not need to set a special path for sudo. Up to you in the end.
The Truth is out there.
Be sure to check the Manual out and always report Bugs or feature requests.
 

Re: Check other users sudo
« Reply #5 on: February 16, 2016, 11:49:52 AM »
 

liamjake05

  • Forum Regular
  • ***
  • 100
    Posts
  • Country: mt
  • Reputation: 3

  • Linux Lite: 4.6 64bit

  • MEMORY: 4Gb
Worked but is there a way to reset this
 

Re: Check other users sudo
« Reply #6 on: February 16, 2016, 12:11:35 PM »
 

shaggytwodope

  • Forum Regular
  • ***
  • 222
    Posts
  • Reputation: 44
  • Linux Lite Member
    • Shaggy's Blog

  • CPU: Intel i5 4440

  • MEMORY: 8Gb

  • VIDEO CARD: Intel HD Graphics 4600
Worked but is there a way to reset this

Reset in what way? Like clearing it? The file CAN be over written but this is far from ideal. Consider using logrotate.

That aside, you can run

Code: [Select]
sudo echo > /var/log/auth.log
But this will completely delete the contents, and is dangerous to use. Be completely sure you got the file name correct before running ANYTHING with sudo in it like this.
The Truth is out there.
Be sure to check the Manual out and always report Bugs or feature requests.
 

Re: Check other users sudo
« Reply #7 on: February 16, 2016, 12:40:07 PM »
 

liamjake05

  • Forum Regular
  • ***
  • 100
    Posts
  • Country: mt
  • Reputation: 3

  • Linux Lite: 4.6 64bit

  • MEMORY: 4Gb
I ment clearing sudo.log
 

Re: Check other users sudo
« Reply #8 on: February 16, 2016, 01:15:44 PM »
 

shaggytwodope

  • Forum Regular
  • ***
  • 222
    Posts
  • Reputation: 44
  • Linux Lite Member
    • Shaggy's Blog

  • CPU: Intel i5 4440

  • MEMORY: 8Gb

  • VIDEO CARD: Intel HD Graphics 4600
Same thing applies mate, just replace auth.log with sudo.log file name.
The Truth is out there.
Be sure to check the Manual out and always report Bugs or feature requests.
 


Tags:
 


Linux Lite 4.8 Final is now available for download and installation