Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-132077

usermod does not append groups in image-mode

Linking RHIVOS CVEs to...Migration: Automation ...RHELPRIO AssignedTeam ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-10.2
    • rpm-ostree
    • None
    • None
    • Moderate
    • rhel-image-mode
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      When running wireshark, there is a certain sandboxing on the binary dumpcap in the system so that users can run the network traffic capture as regular users and not root. This is done by assigning the dumpcap binary ownership as 'root wireshark':

       

       # ls -la /usr/bin/dumpcap
       -rwxr-x---. 1 root wireshark 161544 Oct 13 02:00 /usr/bin/dumpcap
      

      This requires a regular user to be part of wireshark group but on image-mode, the following command does not do anything and silently ends with return code 0:

       

       # usermod -aG wireshark testuser
       # echo $?
       0
       # groups testuser
       testuser : testuser
      

      This results in a situation when the user tries to capture any traffic:

      # su - testuser
      $ tshark -i eth0
      Capturing on 'eth0'
      tshark: Couldn't run dumpcap in child process: Permission denied
      Are you a member of the 'wireshark' group? Try running
      'usermod -a -G wireshark _your_username_' as root.
      0 packets captured
      

      How does one add a user to a group in RHEL when using the image mode version of the system?

              rhn-support-jmarrero Joseph Marrero Corchado
              mruprich@redhat.com Michal Ruprich
              Joseph Marrero Corchado Joseph Marrero Corchado
              Xiaofeng Wang Xiaofeng Wang
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: