Difference between revisions of "OPS435 Assignment 1 - Bash"
(Created page with 'Due: 19 March (midnight) Worth: 10% Write a script that will run for ever (unless it's killed). Every 5 seconds it will check which users have how many SSH connections open to s…') |
|||
Line 5: | Line 5: | ||
<pre>Users logged in: | <pre>Users logged in: | ||
− | * andrew.smith (can not see home directory) | + | * andrew.smith (can not see home directory) - 2 sessions |
− | * johndoe (can not see home directory) | + | * johndoe (can not see home directory) - 1 session |
− | * janesmith (CAN see home directory!)</pre> | + | * janesmith (CAN see home directory!) - 1 session</pre> |
The statement in brackets will communicate to the user whether they can see the contents of the listed user's home directory. | The statement in brackets will communicate to the user whether they can see the contents of the listed user's home directory. |
Revision as of 09:20, 9 March 2016
Due: 19 March (midnight) Worth: 10%
Write a script that will run for ever (unless it's killed). Every 5 seconds it will check which users have how many SSH connections open to server where your script is running (you can get this information from the process list). It will display this information in the following format:
Users logged in: * andrew.smith (can not see home directory) - 2 sessions * johndoe (can not see home directory) - 1 session * janesmith (CAN see home directory!) - 1 session
The statement in brackets will communicate to the user whether they can see the contents of the listed user's home directory.
The script may not work great on matrix (becauase it's a cluster, not just one machine) but you should be able to test it on there.
That's all. Make sure you do the work individually, I would recommend that you don't even discuss the assignment among yourselves, so you're not tempted to use someone else's solution.
Submit the script on Blackboard.