# Choose UID and GID for spamd system user and group

**URL:** <https://forums.rockylinux.org/t/choose-uid-and-gid-for-spamd-system-user-and-group/12526>\
**Category:** Rocky Linux Help & Support\
**Created:** [January 17, 2024, 9:46am UTC](https://forums.rockylinux.org/t/choose-uid-and-gid-for-spamd-system-user-and-group/12526 "2024-01-17T09:46:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![microlinux](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/microlinux/32/1244_2.png) [@microlinux](https://forums.rockylinux.org/u/microlinux)\
**Post date:** [January 17, 2024, 9:46am UTC](https://forums.rockylinux.org/t/choose-uid-and-gid-for-spamd-system-user-and-group/12526/1 "2024-01-17T09:46:34Z")

</div>

Hi,

I’m currently fiddling with SpamAssassin under Rocky Linux 8. I’ve been successfully running it on my mail servers for the last decade or so. I’ve already done some tests, and it seems to run fine under my favorite server distribution.

One little detail though. Running SpamAssassin requires a dedicated `spamd` user and group. Until now I’ve created those like this:

```auto
# groupadd spamd
# useradd -c "SpamAssassin User" -g spamd -s /bin/false -d /var/log/spamassassin spamd

```

But this creates the `spamd` user and group with a UID and GID \> 1000, like my normal users.

I’d like to choose a UID and GID \< 1000 which seems more appropriate to a system user and group, but I’m not sure how to choose it.

Back in the days when I used Slackware Linux on my servers, there was a nice little document ([it still exists here](http://slackbuilds.org/uid_gid.txt)) that informed the user about possible UID and GID pairs for system users.

Is there something similar for RHEL & clones ? I want to make sure that if I choose a UID and GID \< 1000 for `spamd`, this will not create a potential conflict with some other system user and group needed by a different piece of software.

Cheers,

Niki

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [January 17, 2024, 10:11am UTC](https://forums.rockylinux.org/t/choose-uid-and-gid-for-spamd-system-user-and-group/12526/2 "2024-01-17T10:11:04Z")

</div>

See `man groupadd` and `man useradd` for option `--system`. The `/etc/login.defs` mentioned there has some comments too.  
(The commands do have options `--gid` and `--uid` too, respectively, but they require unique parameter.)

* * *

I’ve encountered the /etc/login.defs for `SUB_[GU]ID_*` – for _user namespaces_ that id mapping between host and containers is based on.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [March 17, 2024, 10:11am UTC](https://forums.rockylinux.org/t/choose-uid-and-gid-for-spamd-system-user-and-group/12526/3 "2024-03-17T10:11:29Z")

</div>

Closed on March 17, 2024, 10:11am UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
