How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Mr. Gregory White Your Own Question

Mr. Gregory White
Mr. Gregory White, Professor
Category: Homework
Satisfied Customers: 5229
Experience:  M.A., M.S. Education / Educational Administration
46856550
Type Your Homework Question Here...
Mr. Gregory White is online now
A new question is answered every 9 seconds

Create a script to display “who” is logged on. Display the

Customer Question

Create a script to display “who” is logged on. Display the results on the screen. Make sure to capture ALL standard details associated with each user logged on. 2. Modify the script to append the listing of who is logged on in a file called “users.log” in your home directory. The script is to run in the background. Add the system hostname to the output being recorded. 2% 3. Add a date/time stamp to the file “users.log” before you capture the user information. In addition, edit the user output such that you only receive the “user name”. Check the file and if greater than one week old then create an archive and clean the main file. Only maintain one archive. Log an entry to the file indicating that an archive has been created and provide the filename as well as date/time stamp. 3% 4. Modify the script to execute at 2:00 am without using “cron”. Please note that the script can be started at any time and will check for the hour being “2” every minute. Once the script executes at the time indicated then exit with a return code of “0”. Modify the script to check at a time that you specify at the command line when starting the script. If the operator does not pass a time or an incorrect time in the command line then stop the script immediately and write an error message to the output file. The return code of the script should be set to “1” if this error occurs. The time entry on the command line can be either 12 or 24 hours clock based. Please insert the logic to determine which has been provided and handle accordingly. 3% 6. Modify the script to check if no users are logged in – in this case, please write a message to the file “users.log” indicating that no users where logged in at the time specified. Continue to monitor the system for log in activity for 60 minutes and log all log in events. At the end of 60 minutes exit with a return code of “2” if there were any users logged in over the 60 minute period.
Submitted: 1 year ago.
Category: Homework
Expert:  Mr. Gregory White replied 1 year ago.

Hello, my name is Greg.

I see this might be time sensitive.

Do you still need this answered?

Customer: replied 1 year ago.
No, thank you.
Expert:  Mr. Gregory White replied 1 year ago.

Thanks for the response. I will update the moderator.

Customer: replied 1 year ago.
Thank you
Expert:  Mr. Gregory White replied 1 year ago.
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.