Score:0

Apparmor not generating profile

sx flag

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.
Score:0
pk flag

Do you have #!/bin/bash at the top of your script? Just had the same issue, and as soon as I added the line AppArmor worked as expected.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.