How to fix systemd error: Failed to determine user credentials: No such process

المشكلة

لديك خدمة systemd مثل

service_unit.ini
[Unit]
Description=My Service

[Service]
ExecStart=/usr/bin/my-service
User=myuser

[Install]
WantedBy=multi-user.target

لكن في السجل (systemctl status my-service) ترى الخطأ التالي:

journalctl-log.txt
Jun 19 18:41:36 mycomputer (nice)[1349797]: my-service.service: Failed to determine user credentials: No such process
Jun 19 18:41:36 mycomputer systemd[1]: my-service.service: Main process exited, code=exited, status=217/USER

الحل

سبب هذا بسيط للغاية: المستخدم الذي حددته في توجيه User= غير موجود على نظامك.

افحص المستخدم عن أخطاء إملائية وتحقق أنه موجود فعلًا على الحاسوب المشغّل للخدمة.


Check out similar posts by category: Systemd