Need help with (beginner?) script

I am in an intro to unix/linux course, and need some help with a project. We are tasked with creating a basic script to automate a task that an Admin might need to do. We submitted ideas and mine was to have the system keep a record of log in and log out times for users. I thought this was going to be easy, it seemed like it, but the teacher said if I could pull it off I would get an automatic A and he was anxious to see how I do it. Now I'm worried I bit off a bigger chunk then was expected of me. If I change scripts now I will automatically lose points. I'm not asking for the script to be written for me, not only would I not learn anything but I need to give a description of each line of code and what it does. So really I'm asking if any of you Linux pros, I know you're out there, would either kind of walk me through it or at least send me to the right spot to learn this. My book for the class is for absolute beginners and I'm unable to locate the information necessary to really even begin this task. Any help would be very much appreciated. Even if you can't help thanks for taking the time to read the post.

No homework please, the rules are quite clear and we do not want to be mentionned as "Contract Cheating" site, on the other side we do understand your misfortune, you are the one who will have to show us you work and we will try to guide you or explain your mistakes but do not expect the work be done for you.
That said, lets see what you are up to:
Log when users connect/disconnect can be quite easy but it all depends how the person connects, I usually add a few lines in /etc/profile for that...
Now what about if the user uses ftp, does that count?
and if he connects using remote shell (and so bypasses .profile...)

Good luck

On Linux, connecting accounting is managed through the following utilities:

  • dump-utmp : Converts raw data from /var/run/utmp or /var/log/wtmp into readable ASCII text. Hint: Good for scripting.
  • ac : Reads /var/log/utmp and outputs user connect time in hours.
  • last :Shows a list of last logged-in hours. More detail than ac.
  • who : Shows currently logged-in users. Reads from /var/log/utmp file.
  • utmp : Logs active user sessions.
  • wtmp : Records login and logout activity. Also records system reboots and run-level changes.

So, you can easily get the source code and finish your project in a few days.

Frankly speaking, I don't understand why a student posts such a question here, because you can easily get enough answers and code to move this project forward very fast with a simple Google search.

I am closing this thread after my post. You have more than enough info to move your project forward in this post.

Learn to use Google, that is my advice! All you have done, by posting this question, is to get someone (me) to Google for you. You should be ashamed of yourself. What kind of students can't do simple key word searches using Google??

:mad::mad:

Neo: Post Deleted. User Banned for Multiple Rule Violations.

IP Address Banned.

Never argue with and insult moderators and admins about their decisions, especially when violating homework rules.