Welcome to the Linux Foundation Forum!

Need help with Lab 35.2



I need help with lab 35.2 step 2.
Upon copying the ping utility as ping-x, I ran the ping-x utility as instructed in step 2. However, it did not reproduce the expected error message "ping: socket: Operation not permitted."

Please refer to screenshot below:


  • coop
    coop Posts: 915

    hmm there does seem to be a problem. We'll investigate

  • lee42x
    lee42x Posts: 380

    Investigating, looks like a couple of things.

    Please verify step 1 worked and installed apparmor-profiles and apparmor-utils were installed.


  • cloud4amar

    Hello @lee42x,

    I have verified step 1. It worked. Both apparmor-profiles and apparmor-utils were installed with the newest versions.

    Below is the screenshot for reference:

  • lee42x
    lee42x Posts: 380
    edited January 2023

    Hi cloud4amar, This is an interesting issue, the malfunction you are seeing seems to be Ubuntu related. I was testing and not making excellent progress on Ubuntu (various versions) so I took a clean LF-Debian.11 image and that seems to work exactly as we expect. The steps for my test are:
    1. sudo which ping results /usr/bin/ping
    2. student$ /usr/bin/ping -c 3 -4 results, completed ping successfuly
    3. sudo getcap /usr/bin/ping results, /usr/bin/ping cap_net_raw=ep
    4. sudo setcap -r /usr/bin/ping results, capability removed
    5. student$ /usr/bin/ping -c 3 -4 results /usr/bin/ping: socket: Operation not permitted

    This is what we want, then the rest of the lab should work. I will continue sort out what is up with Ubuntu and post an update later today.



Upcoming Training