jcorporation / myMPD

myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
https://jcorporation.github.io/myMPD/
GNU General Public License v3.0
418 stars 65 forks source link

mympd should be system user & group instead of normal user & group #51

Closed CultofRobots closed 6 years ago

CultofRobots commented 6 years ago

add "-r" or "--system" to lines 54 & 56 in mkrelease.sh 54: [ "$?" = "2" ] && sudo groupadd -r mympd 56: [ "$?" = "2" ] && sudo useradd -r -g mympd -d /var/lib/mympd -s /usr/sbin/nologin mympd

From an organizational standpoint it's better to use a system account for a service as opposed to a normal user account. Will also keep mympd out of the login dialog.

from the man page:

-r, --system Create a system account.

System users will be created with no aging information in /etc/shadow, and their numeric identifiers are chosen in the SYS_UID_MIN-SYS_UID_MAX range, defined in /etc/login.defs, instead of UID_MIN-UID_MAX (and their GID counterparts for the creation of groups).

Note that useradd will not create a home directory for such a user, regardless of the default setting in /etc/login.defs (CREATE_HOME). You have to specify the -m options if you want a home directory for a system account to be created.

jcorporation commented 6 years ago

Fixed in devel