Skip to Content
Mastering Linux Security and Hardening - Second Edition
book

Mastering Linux Security and Hardening - Second Edition

by Donald A. Tevault
February 2020
Intermediate to advanced
666 pages
15h 45m
English
Packt Publishing
Content preview from Mastering Linux Security and Hardening - Second Edition

Hands-on lab – Troubleshooting an AppArmor profile

Perform this lab on your Ubuntu 18.04 VM. Carry out the following steps for troubleshooting:

  1. Install the AppArmor utilities and the extra profiles:
sudo apt install apparmor-utils apparmor-profiles apparmor-profiles-extra
  1. Install Samba and verify that it's running:
sudo apt install sambasudo systemctl status smbdsudo systemctl status nmbd
  1. Set the two aforementioned Samba policies to enforce mode and try to restart Samba:
cd /etc/apparmor.dsudo aa-enforce /usr/sbin/smbd usr.sbin.smbdsudo aa-enforce /usr/sbin/nmbd usr.sbin.nmbdsudo systemctl restart smbd

Note that Samba should fail to restart. (It will take quite a while before it finally errors out, so be patient.)

  1. Look in the /var/log/syslog ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Linux Security and Hardening - Third Edition

Mastering Linux Security and Hardening - Third Edition

Donald A. Tevault
UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin

Publisher Resources

ISBN: 9781838981778Supplemental Content