Wednesday, January 3, 2024

How to change raspbian / Raspberry pi OS user name

Change user name
https://raspberrytips.com/change-raspberry-pi-username/
https://www.scaler.com/topics/how-to-change-username-in-linux/

allow ssh login for root via ssh
sudo vi /etc/ssh/sshd_config
#PermitRootLogin prohibit-password
PermitRootLogin yes

set password on root
passwd root 

logout of all instances of old user
ssh to host as root

change user name
usermod -l newusername oldusername 

change user directory
usermod -d /home/new_username -m new_username


--30--

No comments:

Post a Comment