Page 1 of 1

how to delete user PI [solved]

Posted: Wed Nov 23, 2016 7:29 pm
by Canedje
I do try to delete user pi by: sudo userdel pi -r
But every time there is a process running like: userdel: user pi is currently used by process 2223
if I look with ps -aux I do find:

Code: Select all

pi        2311  0.0  0.3   5120  3272 ?        Ss   20:26   0:00 /lib/systemd/systemd --user
pi        2317  0.0  0.1  24448  1400 ?        S    20:26   0:00 (sd-pam)
pi        2322  0.4  0.4   6724  4568 tty1     S+   20:26   0:00 -bash
How can I delete user pi?

Re: how to delet pi user

Posted: Wed Nov 23, 2016 7:49 pm
by HawaiianPi
Are you logged in as pi? Make sure Raspbian is not set to auto-login as pi.

I don't see any any pi processes in use on my system.

Re: how to delet pi user

Posted: Wed Nov 23, 2016 8:10 pm
by Canedje
Thanks .
It looks like the problem.
The boot was set to automatic login as pi user at desktop

Strange because the pi user doesnt exist anymore. It still logs in as pi???

Re: how to delet pi user

Posted: Wed Nov 23, 2016 8:29 pm
by HawaiianPi
The pi user must still exist if the system was logging in as pi.

You could try locking the pi account with

Code: Select all

sudo passwd --lock pi

Re: how to delet pi user

Posted: Wed Nov 23, 2016 8:38 pm
by Canedje
thanks again
Pi is removed.
I login at desktop by an other user automatic at startup.
if I do the command: ps -fu pi there are no processes anymore