Here's the `useradd` command that would create that `/etc/passwd` entry:
```bash
sudo useradd --uid 108 --gid 114 --home-dir /var/ipfs --shell /usr/sbin/nologin --comment "IPFS,,," --system --no-create-home ipfs
```
Breaking down the options:
- `--uid 108` (or `-u 108`): Sets the user ID to 108
- `--gid 114` (or `-g 114`): Sets the primary group ID to 114
- `--home-dir /var/ipfs` (or `-d /var/ipfs`): Sets the home directory to `/var/ipfs`
- `--shell /usr/sbin/nologin` (or `-s /usr/sbin/nologin`): Sets the shell to `/usr/sbin/nologin`
- `--comment "IPFS,,,"` (or `-c "IPFS,,,"`): Sets the GECOS field to "IPFS,,,"
- `--system` (or `-r`): Creates a system user
- `--no-create-home` (or `-M`): Don't create the home directory automatically
- `ipfs`: The username
**Note:** You'll need to ensure group 114 exists first:
```bash
sudo groupadd --gid 114 ipfs
```
**Shorter version using short options:**
```bash
sudo useradd -u 108 -g 114 -d /var/ipfs -s /usr/sbin/nologin -c "IPFS,,," -r -M ipfs
```
The main difference from `adduser` is that `useradd` is the lower-level command and requires you to specify all options explicitly, while `adduser` is a higher-level wrapper with more defaults.