usermod -l or userdel -r commands not functioning
When logged in as root tried to delete or modify user
Error as below is result
> userdel: user “svdodd” is currently used by process PID 595(systemd-user)
Tried with out locking and
after locking user with usemod -L. Both cases resulted in same error
Could you have a systemd-service enabled on the user-level that is blocking your intended commands?
Remove user “svdodd” from group “autologin”:
sudo gpasswd -d svdodd autologin
Not sure. How to check that please
Removed user from autologin. still not permitting
some times ssh-agent-s process and sometimes systemd-systmed-user UID are shown as causes of association for user.
What is that process running?
You can run
systemctl status 595 to find it out.
Then, if it is a process controlled by the user you wanted to delete, do
systemctl stop NAME-OF.service followed by
systemctl disbale NAME-OF.service, followed by a reboot.
Afterwards you should be able to remove the user, like you intended.
Process is systemd/systemd-user.
I tried to kill that process from task manager list of PID.
System logged me out even if logged in as a different user or as a root
Only once it was ssh-agent-s. Killed that and tried . Again same error . Association with systemd-user process. Any involvement of remote control or malware?
I did that already as per suggestion from https://forum.endeavouros.com/u/ivanhoe 1 day ago
But still my PC when shutting down waits for 92 seconds and runs stop job for user manager GID 1000 , which is live user GID. In fact system should erase all user processes during shutdown as per yes setting.
It is weird to see some times system shuts down with out stop job for 902 seconds.Especially immediately after installing kernel updates. Next shut down back to same story. Waits before shut down running stop job for 92 seconds.
One missing file gnome-session-restart-dbus.service noted. can not find it at path
In this file slice -/.slice need to be added.
Once i have seen Slicing user sessions during shutdown with out any wait
Now slicing does not work despite KillUserProcesses=yes in /etc/systemd/logind.conf