4k3or3et
Posts: 29
Joined: Sat Nov 17, 2018 5:47 pm

Lasted Raspbian Buster, cannot rename user.

Mon Jun 24, 2019 9:38 pm

Hi guys

i cannot rename user on latest Raspbian Buster. while typing:

Code: Select all

usermod -l newuser -d /home/newuser -m pi
i get:

Code: Select all

usermod: user pi is currently used by process 1172
'ps -u pi' gives:

Code: Select all

 1172 ?        00:00:00 systemd
 1175 ?        00:00:00 (sd-pam)
 1188 tty1     00:00:00 bash
I can kill 'systemd' and '(sd-pam)' but when i kill 'bash' process the 'systemd' and '(sd-pam)' comes back.

any clues how to successfully kill bash process?

Andyroo
Posts: 3350
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Lasted Raspbian Buster, cannot rename user.

Mon Jun 24, 2019 9:39 pm

Start in headless, sign on as root and see if that does it?

Edit: Previously it was always recommend that you just disable Pi and create a new user.
Need Pi spray - these things are breeding in my house...

4k3or3et
Posts: 29
Joined: Sat Nov 17, 2018 5:47 pm

Re: Lasted Raspbian Buster, cannot rename user.

Mon Jun 24, 2019 9:44 pm

Andyroo wrote:
Mon Jun 24, 2019 9:39 pm
Start in headless, sign on as root and see if that does it?

Edit: Previously it was always recommend that you just disable Pi and create a new user.
My RPi is headless. VNC is disabled. Logged in straight as root. Also i disabled autologin. Any other clues guys?

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

Re: Lasted Raspbian Buster, cannot rename user.

Mon Jun 24, 2019 9:50 pm

Andyroo wrote:
Mon Jun 24, 2019 9:39 pm
... Previously it was always recommend that you just disable Pi and create a new user.
This ^

Just create a new user, add it to all the same groups as the pi user and disable (or delete) the pi user. That's what I've always done.
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?

4k3or3et
Posts: 29
Joined: Sat Nov 17, 2018 5:47 pm

Re: Lasted Raspbian Buster, cannot rename user.

Wed Jun 26, 2019 5:15 pm

Thanks guys.

Solution was to disable autostart in GUI of Raspberry Pi configuration. After reboot i could rename the user.

Return to “Beginners”