Sample Header Ad - 728x90

Fedora CoreOS: how can I add a user to dialout group?

1 vote
2 answers
182 views
## Problem Context: Fedora CoreOS operating system (read-only root filesystem). I'm trying to add myuser to group dialout so I can access /dev/ttyS1 via its group owner. However, during first boot, Ignition phase keeps failing. **Questions**: - How can I add a custom user to group dialout? - How is it possible that it fails with the 2 error messages below ("group doesn't exist" and "group already exists")? Docs reference: [Fedora CoreOS Docs | Configuring Groups](https://docs.fedoraproject.org/en-US/fedora-coreos/authentication/#_configuring_groups) ## What I tried ### Adding User to Group It fails with message _**"useradd: group 'dialout' does not exist\n"**_. Butane config:
variant: fcos
version: 1.6.0
passwd:
  users:
    - name: myuser
      # Password: mypassword
      password_hash: "$y$j9T$tZyPwp1NEbj9P6WAv.F720$Rj9PJnLqoTph5k2Qd5hAPLF6Evsp9TEgCz5ZkmwMHT4"
      groups:
        - sudo
        - dialout
      home_dir: /home/myuser
      shell: /bin/bash
      uid: 1001
Ignition config:
{
  "ignition": {
    "version": "3.5.0"
  },
  "passwd": {
    "users": [
      {
        "groups": [
          "sudo",
          "dialout"
        ],
        "homeDir": "/home/myuser",
        "name": "myuser",
        "passwordHash": "$y$j9T$tZyPwp1NEbj9P6WAv.F720$Rj9PJnLqoTph5k2Qd5hAPLF6Evsp9TEgCz5ZkmwMHT4",
        "shell": "/bin/bash",
        "uid": 1001
      }
    ]
  }
}
Logs (journalctl):
-none
...
ignition: files: ensureUsers: op(2): [started] creating or modifying user "myuser"
ignition: files: ensureUsers: op(2): executing: "useradd" "--root" "/sysroot" "--home-dir" "/home/myuser" "--create-home" "--password" "$y$j9T$tZyPwp1NEbj9P6WAv.F720$Rj9PJnLqoTph5k2Qd5hAPLF6Evsp9TEgCz5ZkmwMHT4" "--uid" "1001" "--groups" "sudo,dialout" "--shell" "/bin/bash" "myuser"
ignition: files: ensureUsers: op(2): [failed]   creating or modifying user "myuser": exit status 6: Cmd: "useradd" "--root" "/sysroot" "--home-dir" "/home/myuser" "--create-home" "--password" "$y$j9T$tZyPwp1NEbj9P6WAv.F720$Rj9PJnLqoTph5k2Qd5hAPLF6Evsp9TEgCz5ZkmwMHT4" "--uid" "1001" "--groups" "sudo,dialout" "--shell" "/bin/bash" "myuser" Stdout: "" Stderr: "useradd: group 'dialout' does not exist\n"
systemd: ignition-files.service: Main process exited, code=exited, status=1/FAILURE
...
systemd: ignition-files.service: Failed with result 'exit-code'.
### Creating Group AND Adding User to Group This time it fails with message _**"groupadd: group 'dialout' already exists\n"**_. Butane config:
variant: fcos
version: 1.6.0
passwd:
  groups:
    - name: dialout
      gid: 18  # Standard dialout GID
  users:
    - name: myuser
      # Password: mypassword
      password_hash: "$y$j9T$tZyPwp1NEbj9P6WAv.F720$Rj9PJnLqoTph5k2Qd5hAPLF6Evsp9TEgCz5ZkmwMHT4"
      groups:
        - sudo
        - dialout
      home_dir: /home/myuser
      shell: /bin/bash
      uid: 1001
Ignition config:
{
  "ignition": {
    "version": "3.5.0"
  },
  "passwd": {
    "groups": [
      {
        "gid": 18,
        "name": "dialout"
      }
    ],
    "users": [
      {
        "groups": [
          "sudo",
          "dialout"
        ],
        "homeDir": "/home/myuser",
        "name": "myuser",
        "passwordHash": "$y$j9T$tZyPwp1NEbj9P6WAv.F720$Rj9PJnLqoTph5k2Qd5hAPLF6Evsp9TEgCz5ZkmwMHT4",
        "shell": "/bin/bash",
        "uid": 1001
      }
    ]
  }
}
Logs (journalctl):
-none
ignition: files: ensureGroups: op(1): [started] adding group "dialout" 
ignition: files: ensureGroups: op(1): executing: "groupadd" "--root" "/sysroot" "--gid" "18" "--password" "*" "dialout"
ignition: files: ensureGroups: op(1): [failed]   adding group "dialout": exit status 9: Cmd "groupadd" "--root" "/sysroot" "--gid" "18" "--password" "*" "dialout" Stdout: "" Stderr: "groupadd: group 'dialout' already exists\n"
...
systemd: ignition-files.service: Main process exited, code=exited, status=1/FAILURE
systemd: ignition-files.service: Failed with result 'exit-code'.
systemd: Failed to start ignition-files.service - Ignition (files).
Asked by mikyll98 (121 rep)
May 15, 2025, 12:55 PM
Last activity: Jul 3, 2025, 02:47 PM