Im trying to create an apparmor profile using aa-genprof for a simple shell script. But it dosen't prompt for the questions when I select S [Scan option]. As mentioned, I ran the shell script in another window after it prompted to run the program in separate window.
As you can see its prompting again to run the script. The OS is Ubuntu 18
root@k02:~# aa-genprof /root/exm.sh
Writing updated profile for /root/exm.sh.
Setting /root/exm.sh to complain mode.
Before you begin, you may wish to check if a
profile already exists for the application you
wish to confine. See the following wiki page for
more information:
http://wiki.apparmor.net/index.php/Profiles
Profiling: /root/exm.sh
Please start the application to be profiled in
another window and exercise its functionality now.
Once completed, select the "Scan" option below in
order to scan the system logs for AppArmor events.
For each AppArmor event, you will be given the
opportunity to choose whether the access should be
allowed or denied.
[(S)can system log for AppArmor events] / (F)inish
Reading log entries from /var/log/syslog.
Updating AppArmor profiles in /etc/apparmor.d.
Profiling: /root/exm.sh
Please start the application to be profiled in
another window and exercise its functionality now.
Once completed, select the "Scan" option below in
order to scan the system logs for AppArmor events.
For each AppArmor event, you will be given the
opportunity to choose whether the access should be
allowed or denied.
[(S)can system log for AppArmor events] / (F)inish
Setting /root/exm.sh to enforce mode.