Raspberry Pi/Rename user pi

From Wiki
< Raspberry Pi
Revision as of 11:52, 29 December 2021 by Marcluer (talk | contribs) (Die Seite wurde neu angelegt: „<pre> passwd sudo passwd # activate root access sed -i '/^#PermitRootLogin.*/a PermitRootLogin yes' /etc/ssh/sshd_config reboot ssh root@... us…“)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
passwd
sudo passwd               # activate root access
sed -i '/^#PermitRootLogin.*/a PermitRootLogin yes' /etc/ssh/sshd_config

reboot
ssh root@...

usermod -l marcluer -d /home/marcluer -m pi
groupmod -n marcluer pi
sed -i 's/pi/marcluer/g' /etc/sudoers.d/010_pi-nopasswd
sed -i 's/PermitRootLogin yes/#PermitRootLogin yes/g' /etc/ssh/sshd_config

reboot
ssh marcluer@...

sudo passwd -l root       # deactivate root access