Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

how to delete user PI [solved]

Wed Nov 23, 2016 7:29 pm

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?

User avatar
HawaiianPi
Posts: 4862
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: how to delet pi user

Wed Nov 23, 2016 7:49 pm

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.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Re: how to delet pi user

Wed Nov 23, 2016 8:10 pm

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???

User avatar
HawaiianPi
Posts: 4862
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: how to delet pi user

Wed Nov 23, 2016 8:29 pm

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
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Re: how to delet pi user

Wed Nov 23, 2016 8:38 pm

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

Return to “Troubleshooting”