{"id":255,"date":"2009-04-06T12:20:37","date_gmt":"2009-04-06T17:20:37","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=255"},"modified":"2009-04-06T12:20:37","modified_gmt":"2009-04-06T17:20:37","slug":"logging-what-users-do-in-bash","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2009\/04\/logging-what-users-do-in-bash\/","title":{"rendered":"Logging What Users Do In BASH"},"content":{"rendered":"<p>I like the BASH Shell &#8211; it&#8217;s fun and the default shell, so pretty much everyone can use it.  And since I like the Ubuntu\/Debian, the following steps apply to these systems &#8211; and you can probably figure out how to get them to work with BSD or another *nix flavor.<\/p>\n<p>Finding out what people do with their access, on the other hand, is a little more difficult.<\/p>\n<p>Sure, you can lookup their bash_history file, but that only goes back 15 to 25 commands (unless setup to a non-standard logging).<br \/>\n<code>nano \/home\/username\/.bash_history<\/code><\/p>\n<p>Then I was turned onto Accounting Management:<br \/>\napt-get install acct<\/p>\n<p>That&#8217;s it!  Easy, right?<br \/>\nWell, to see the information you have to know which commands to type.<\/p>\n<p>LastComm shows the last command by a certain user, or when the command last matches your variable:<br \/>\n<code>lastcomm username<\/code><br \/>\n<code>lastcomm PID\/Process<\/code><\/p>\n<p>AC<br \/>\n<code>ac<\/code><br \/>\n<code>ac -d<\/code><br \/>\n<code>ac -p<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I like the BASH Shell &#8211; it&#8217;s fun and the default shell, so pretty much everyone can use it. And since I like the Ubuntu\/Debian, the following steps apply to these systems &#8211; and you can probably figure out how to get them to work with BSD or another *nix flavor. Finding out what people &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2009\/04\/logging-what-users-do-in-bash\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Logging What Users Do In BASH<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-255","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":2,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/255\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/255\/revisions\/257"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}