LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-05-2012, 01:45 PM   #1
mcfip
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Rep: Reputation: 0
pam_tty_audit output different for root vs a general user


Using CentOS 6.3 but will want to do the same on other flavors like Ubuntu and Debian.

Trying to capture information entered in a ssh session. Works great for login: root
Do not work so well for su or login as a general user.

Login as Root output:
aureport --tty
1. 09/05/2012 10:14:01 20776 0 ? 1416 bash "ls",<ret>
2. 09/05/2012 10:14:08 20780 0 ? 1416 bash "exit",<ret>

Great: One command per line.

su output:
aureport --tty
31. 09/05/2012 10:36:47 20977 0 ? 1417 bash "su mike",<ret>
32. 09/05/2012 10:36:51 20983 0 ? 1417 bash "ls",<ret>,"ls",<ret>,"exit",<ret>

Not so good. All commands in one entry.

login as a general user output:
34. 09/05/2012 10:37:10 21012 500 ? 1427 bash "ls",<ret>,"ls",<ret>,"pwd",<ret>,"mdc",<ret>,"exit",<ret>

Not so good. All commands in one entry.

What am I missing? What do I need to do to get one command per entry (like the root case) vs. all commands in one entry?

Below is the sshd pam config file. Do I need to modify other files as well like: su, login, etc.?

I have also noticed if I try to use: enable=* it does not work for ALL users. I must specify the user list: enable=root,mike
Any thoughts?

sshd pam.d file:
#%PAM-1.0
auth required pam_sepermit.so
auth include password-auth
account required pam_nologin.so
account include password-auth
password include password-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_tty_audit.so enable=root,mike
session required pam_loginuid.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open env_params
session optional pam_keyinit.so force revoke
session include password-auth

Thanks,
Mike
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the general rule(if any?) about downloading/installing as User or Root? kbusche Linux - Newbie 1 03-24-2006 02:00 AM
X loads fine as root, but not as a general user IanS Linux - Newbie 0 10-05-2003 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration