Raspberry Pi/Rename user pi: Difference between revisions
(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…“) |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Change user "pi" to "marcluer" == | |||
<pre> | <pre> | ||
passwd | passwd | ||
Line 11: | Line 12: | ||
sed -i 's/pi/marcluer/g' /etc/sudoers.d/010_pi-nopasswd | sed -i 's/pi/marcluer/g' /etc/sudoers.d/010_pi-nopasswd | ||
sed -i 's/PermitRootLogin yes/#PermitRootLogin yes/g' /etc/ssh/sshd_config | sed -i 's/PermitRootLogin yes/#PermitRootLogin yes/g' /etc/ssh/sshd_config | ||
sudo passwd -l root # deactivate root access | |||
reboot | reboot | ||
ssh marcluer@... | ssh marcluer@... | ||
</pre> | </pre> |
Latest revision as of 11:59, 29 December 2021
Change user "pi" to "marcluer"
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 sudo passwd -l root # deactivate root access reboot ssh marcluer@...