Appendix B. Additional exercises:

Task One

You look after a Debian server for a small company; apart from you, there are three other people:

  • Billy Bob, your boss.

  • Jane Doe, the secretary and receptionist.

  • Joe Blogs, the sales rep.

  1. Create login accounts for these three people, and generate good passwords for them. Make sure that each user has their own UPG.

  2. Lock Jane Doe's account.

  3. Can you find out where the system makes a note of which accounts are locked? [Hint: read the man page for passwd(5)]

  4. Verify that each user has their own UPG; what command do you use to do this?

  5. Now create a directory called /home/shared. Make sure that Billy Bob and Joe Blogs have read and write access to it. Jane Doe, however, should only have read access. (It doesn't matter if everyone on the system has read access to the directory).

  6. Pretend that you don't know the passwords for the user accounts, and make use of the su command to become the other users, and verify that they have the correct access permissions to the /home/shared directory.

  7. Now create a cron job, which runs at 08:00AM every weekday, which sends an e-mail to Billy Bob, displaying the contents of the /home/shared directory.

  8. Now create an additional cron job, which backs up the contents of the /home/shared directory into a tar & gzipd file called /home/shared-backup.tar.gz. The job should run every Friday at 6PM.

  9. Which cron table did you edit to create the first cron job? Did you use the same one for the second cron job, or a different one?

Task Two

  1. Use the apt system to install the "zip" package.

  2. Can you find out where the bin files for this package have been installed? What command did you use?

  3. Now manually delete the bin files that this package installed.

  4. Does dpkg still think that the package is installed? Why?

  5. Use dpkg to re-install the missing files.

  6. Now use dpkg to remove the package completely.