[colug-432] Another bash question, su + history ?

R P Herrold herrold at owlriver.com
Thu Dec 29 16:46:24 EST 2011


On Wed, 28 Dec 2011, Tom Hanlon wrote:

> I find myself in training classes as the instructor where a student or myself has performed a number of steps while logged in as the incorrect user.
>
> So I point this out, and they su as needed.
>
> But the history is left as entered in the wrong user history file.
>
> Does anyone here have any quick tricks to su but also grab the last 10 lines or so of history ?

alias 'su' to 'su -' so that they cannot so mess up?

depending on the shell, there is also the ability to have an 
'on exit' script fire and harvest the 'depends on the shell' 
history file, if any

also there are logging shells, a la script, but less avoidable

finally, I have a copy of the sources from the last GPL 
released version of such a logging environment at:
 	ftp://ftp.owlriver.com/pub/mirror/ORC/eas/

touted as an: Enterprise Audit Shell

'Enterprise Audit Shell enables organizations to centrally 
control and audit UNIX shell access. Audit logs are recorded 
and archived detailing shell input and output, which can be 
played back and reviewed'

the FOSS project underlying such was bought, and the sources 
taken down promptly right after the 2.0 version was released, 
but my mirroring strategies permitted me to look back in time 
to snag it

-- Russ herrold


More information about the colug-432 mailing list