https://bugs.kde.org/show_bug.cgi?id=467176
--- Comment #7 from Josef Schabasser <[email protected]> --- (In reply to Josef Schabasser from comment #6) > I found the issue in file samba/filepropertiesplugin/usermanager.cpp > 1. on line 22 the max UID is set to 65000 > 2. then the file /etc/login.defs is parsed > 3. the max UID is overwritten with whatever UID_MAX is found in > aforementioned file > > I would solve it as follows: > 1. detect if user is managed by systemd-homed > 2. if true, use 60001-60513 (or multiple ranges) as described here: > https://systemd.io/UIDS-GIDS/ > 3. if false, parse /etc/login.defs and use what's configured there with > fallbacks to 1000-65000 > > Setting UID_MAX to 65000 in /etc/login.defs works around this issue. I'm sorry, I don't know how to edit comments. One way to solve this is to test the environment variable $SYSTEMD_HOME of the current user. The variable has a value of `1` if the user is managed by systemd-homed (see https://www.freedesktop.org/software/systemd/man/259/pam_systemd_home.html). If the variable is `0` or empty/null/undefined, fall back to the old logic. This way we could set min/max GID/UID depending on the current user. -- You are receiving this mail because: You are watching all bug changes.
