LinuxQuestions.org
Register a domain and help support LQ
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 01-07-2008, 07:37 AM   #1
shan_nathan
Member
 
Registered: Jun 2007
Location: India
Distribution: Redhat
Posts: 137

Rep: Reputation: 15
script command


Dear all,

I want to log every user's each and every commands and the outputs
of what they done. So i added the line

script logfile1

in the .bashrc file of the users home directory.

But when i try login as a user i get the output continously

Have a lot of BUN...

Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1
Script started, file is logfile1


and this is my .bashrc file

test@MyLinux:~> cat .bashrc
# Sample .bashrc for SuSE Linux
# Copyright (c) SuSE GmbH Nuernberg

# There are 3 different types of shells in bash: the login shell, normal shell
# and interactive shell. Login shells read ~/.profile and interactive shells
# read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all
# settings made here will also take effect in a login shell.
#
# NOTE: It is recommended to make language settings in ~/.profile rather than
# here, since multilingual X sessions would not work properly if LANG is over-
# ridden in every subshell.

# Some applications read the EDITOR variable to determine your favourite text
# editor. So uncomment the line below and enter the editor of your choice :-)
#export EDITOR=/usr/bin/vim
#export EDITOR=/usr/bin/mcedit

# For some news readers it makes sense to specify the NEWSSERVER variable here
#export NEWSSERVER=your.news.server

# If you want to use a Palm device with Linux, uncomment the two lines below.
# For some (older) Palm Pilots, you might need to set a lower baud rate
# e.g. 57600 or 38400; lowest is 9600 (very slow!)
#
#export PILOTPORT=/dev/pilot
#export PILOTRATE=115200

test -s ~/.alias && . ~/.alias || true
script logfile1


Can some one tell me the syntex for me

Thanks in advance

Shan
 
Old 01-07-2008, 08:00 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,260
Blog Entries: 54

Rep: Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841
Instead of your solution look at GRSecurity logging (invasive, needs kernel patch) or a "wrapper" like Rootsh.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Bash Script as command whited Programming 15 12-10-2007 06:14 AM
please help with command line or script thtr2k Linux - Software 2 03-04-2007 01:03 PM
Help on a command for a script. assasukasse Linux - Newbie 6 06-05-2006 08:36 AM
script command trasher Linux - Newbie 5 02-06-2006 06:20 AM
help with Date command in script icw_sec Programming 6 01-06-2004 11:02 AM


All times are GMT -5. The time now is 02:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration