Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

systemd error with user having a dot (.) in name: Invalid user/group name or numeric ID

Linux Ubuntu 18. MariaDB 10.3. MariaDB service fails to start throwing a systemd error. The reason seems to be that the userid contains a dot (.).

systemd[1]: Invalid user/group name or numeric ID: myuser.withdot

Configuration:

The service file from MariaDB is /etc/systemd/system/mariadb.service.d/migrated.conf, and it contains:

[Service]
User=myuser.withdot
like image 942
freeAR Avatar asked Dec 12 '25 02:12

freeAR


1 Answers

A simple solution that seems to be working, is replacing the user name with id:

id myuser.withdot
uid=12345(myuser.withdot) ...

Replace the user name with id in the systemd config file:

[Service]
User=m12345

Reload the config file:

sudo systemctl daemon-reload

Restart the service:

sudo service mariadb start
like image 188
freeAR Avatar answered Dec 14 '25 17:12

freeAR



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!