Script Help -- documenting specific users that log into server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script Help -- documenting specific users that log into server
# 1  
Old 11-17-2011
Script Help -- documenting specific users that log into server

Hello All,

I am trying trying to write a shell script that will do a couple things:

1.) Identify any username that logs into the server.

2.) When the user logs out, send them an email detailing
their log in/out times, duration logged in, and what
processes they ran.

Basically, I need help with which commands I should employ and how to send the emails. Any advice or syntax is much appreciated. Thanks!!
# 2  
Old 11-17-2011
Commands you will be interested in are who and mail. Check the man page for moe info.

HTH
--ahamed

Last edited by ahamed101; 11-18-2011 at 02:50 AM..
# 3  
Old 11-17-2011
Quote:
Originally Posted by SecureScript
I am trying trying to write a shell script that will do a couple things:
.....
Basically, I need help with which commands I should employ and how to send the emails. Any advice or syntax is much appreciated. Thanks!!
Welcome to Unix.com forum.
Look like this is your very first post on this forum but you ignored to read the forum rules first.
Your post look like a homework/assignment and we have special rules for this type of posts/questions.
Please reconsider, read the forum rules and post in the appropriate forum.
# 4  
Old 11-18-2011
Welcome to the forums and greetings to Bristol /RWU. And danmero is right, homework goes here, with special rules.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

Script for Creating more users like 50 in one server

Hi friends could you please share me the script to create more users in one server except newusers, is there any option to change secondary group and how to print passwd and changing the age all these things how can i edit in newsers.. please help me (0 Replies)
Discussion started by: indiankrish
0 Replies

2. Shell Programming and Scripting

Shell Script to filter users and create them again from a back-up server

This is a script to filter the users out of etc/passwd and etc/group. So if you want to migrate of restore a server you can use this script from a backup to restore and make the same users on you had.. Please feedback and comments. #!/bin/bash prompt_list () { # haal uit de argumenten de... (5 Replies)
Discussion started by: dannyvdberg
5 Replies

3. Ubuntu

how to mount specific drive for specific users in ubuntu 11.04?

hi friends ... could u tell me how to mount specific drive (ntfs or fat 32) for specific users in ubuntu 11.04 ? ie ,if there is a user called staff (a desktop user ) ,then he should able to use staff drive only ? thanks in advance ...:) (1 Reply)
Discussion started by: kapali255
1 Replies

4. Shell Programming and Scripting

Log to find users who accessed server before

Hi, please provide the steps/commands to find out the user id list who accessed server before i logon same server. Thank you very much ffor all your support. (2 Replies)
Discussion started by: sridhardwh
2 Replies

5. Shell Programming and Scripting

Script to monitor directory size of specific users

Hi, i am new to shell scripts, i need to write a script that can monitor size of directory of specific users. Please help. Thanks, Nitin (2 Replies)
Discussion started by: nicksrulz
2 Replies

6. UNIX for Advanced & Expert Users

Need A Script To List All Failed Log In Users

I need to list all the failed log in users as part of audit report. How can I do so in Linux to find all the audit log records and then upload to a table for future reference. I am using oracle 10g on Linux. Hope I will get a quick response from the experts. Thanks in advance for the tips. (3 Replies)
Discussion started by: oraQ
3 Replies

7. Shell Programming and Scripting

Bourne Shell script - log for users loggin on and off

Hello all, I'm new to shell scripting and want to make a script that I can write to log the users logging on and off the a unix system. I have had a good look over the past few days to crack it, I think I am getting close. I want a script that runs an infinite loop to check every 5 seconds... (14 Replies)
Discussion started by: noodlesoup
14 Replies

8. UNIX for Dummies Questions & Answers

Documenting a Shell Script

I've been working on a very long shell script that's becoming a mini-application. It is my first script, and continues to grow each week, becoming more and more complex. I've been asked to document my script, beginning with basic information and then detailing any information about its... (1 Reply)
Discussion started by: yongho
1 Replies
Login or Register to Ask a Question