Linux Lite Forums
Check other users sudo - Printable Version

+- Linux Lite Forums (https://www.freecinema2022.gq/forums)
+-- Forum: Software - Support (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=5)
+--- Forum: Other (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=20)
+--- Thread: Check other users sudo (/showthread.php?tid=2667)



Check other users sudo - liamjake05 - 02-13-2016

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? [Image: tdswGqz.png?1]


Re: Check other users sudo - torreydale - 02-13-2016

It looks like it goes to /var/log/auth.log


Re: Check other users sudo - liamjake05 - 02-13-2016

did not work


Re: Check other users sudo - Wirezfree - 02-13-2016

ave you logged into "your" account and checked /var/log/auth.log
????


Re: Check other users sudo - shaggytwodope - 02-16-2016

(02-13-2016, 12:08 PM)liamjake05 link Wrote: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:
sudo visudo

and add the line

Code:
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:
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.


Re: Check other users sudo - liamjake05 - 02-16-2016

Worked but is there a way to reset this


Re: Check other users sudo - shaggytwodope - 02-16-2016

(02-16-2016, 04:49 PM)liamjake05 link Wrote: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:
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.


Re: Check other users sudo - liamjake05 - 02-16-2016

I ment clearing sudo.log


Re: Check other users sudo - shaggytwodope - 02-16-2016

Same thing applies mate, just replace auth.log with sudo.log file name.