LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-19-2009, 01:12 AM   #1
pradeepgokulr007
LQ Newbie
 
Registered: Mar 2009
Posts: 11

Rep: Reputation: 0
Thumbs up To run user designed scripts when user logs in


Hai 2 all,
How to run user script when a user logs in.In which file we have 2 add this script.For example if a user logs in,then the script has to tell production last date for that particular user.wr to do this?

Thanx in advance
 
Old 08-19-2009, 01:24 AM   #2
settntrenz
Member
 
Registered: Aug 2009
Location: Orlando, Florida
Distribution: RHEL, Ubuntu
Posts: 49

Rep: Reputation: 19
Assuming you're using bash, you should put it in

/etc/profile if you want it to run for all users.
~/.bash_profile if you want it to run for individual users.

man bash
 
Old 08-19-2009, 03:02 AM   #3
pradeepgokulr007
LQ Newbie
 
Registered: Mar 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Thumbs up Thanks.wat is the command 2 monitor a user activity

Thanks a lot.
But tell me the command how to monitor the activity of a logged user by root without users knowledge.
 
Old 08-19-2009, 03:09 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
But tell me the command how to monitor the activity of a logged user by root without users knowledge.
Why would you want to do that?
 
Old 08-19-2009, 03:12 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
rootsh is a popular solution http://linux.die.net/man/1/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
Have Proftpd run a script after user logs out derridking Linux - Server 0 04-01-2009 06:24 PM
How to force sth to run when each user logs in? licht Linux - Newbie 4 07-08-2007 10:18 PM
Automaticly run script when user logs in? bigdog0007 Linux - Security 3 06-23-2005 04:14 PM
run program after user logs in kinasz Linux - General 2 09-22-2004 04:47 AM
how can i run a shell scripts (or a number of commands )when a user logs in to a linu rddreamz Programming 4 05-20-2004 04:08 PM


All times are GMT -5. The time now is 11:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration