What is the default SSH username/password for OctoPrint/OctoPi?
Username: pi Password: raspberry Default Keyboard-Layout: en-UK!!
Change the keyboard layout on Raspberry Pi OS Lite
sudo raspi-config
How to Create a New User on Raspberry Pi?
sudo useradd andreas sudo useradd andreas sudo sudo deluser pi userdel: user pi is currently used by process 394 /home/pi/oprint/bin/python /home/pi/oprint/bin/octoprint serve --host=127.0.0.1 --port=5000
Bei Verwendung einer anderen Netzwerk-Management-Software, z.B. NetworkManager (NM) oder systemd-networkd, sollte von einer Bearbeitung der /etc/network/interfaces abgesehen werden. Diese Programme verwenden eigene Konfigurationsdateien, weshalb die Bearbeitung der Datei /etc/network/interfaces zur Konfiguration von Netzwerk-Verbindungen nicht sinnvoll ist.
Differences between /etc/dhcpcd.conf and /etc/network/interfaces?
/etc/network/interfaces legacy interfaces /etc/dhcpcd.conf dhcpcd /etc/NetworkManager/NetworkManager.conf NetworkManager $ systemctl --type=service
dhcpcd
$ systemctl status dhcpcd ● dhcpcd.service - DHCP Client Daemon Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/dhcpcd.service.d └─wait.conf Active: active (running) since Thu 2022-09-22 02:20:46 BST; 27min ago Docs: man:dhcpcd(8) Process: 404 ExecStart=/usr/sbin/dhcpcd -w -q (code=exited, status=0/SUCCESS) Tasks: 2 (limit: 1472) CPU: 1.278s CGroup: /system.slice/dhcpcd.service ├─584 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 └─774 /usr/sbin/dhcpcd -w -q $ systemctl status NetworkManager ● NetworkManager.service - Network Manager Loaded: loaded (/lib/systemd/system/NetworkManager.service; disabled; vendor preset: enabled) Drop-In: /usr/lib/systemd/system/NetworkManager.service.d └─10-dhcpcd.conf Active: inactive (dead) Docs: man:NetworkManager(8)
802.1X Authentifizierung in Rechnernetzen
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf $ sudo wpa_supplicant -i eth0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -d $ sudo wpa_cli -i wlan0 reconfigure
NetworkManager
Configure Network Settings Using Network Manager in Linux
$ systemctl status dhcpcd ● dhcpcd.service - DHCP Client Daemon Loaded: loaded (/lib/systemd/system/dhcpcd.service; disabled; vendor preset: enabled) Drop-In: /etc/systemd/system/dhcpcd.service.d └─wait.conf Active: inactive (dead) Docs: man:dhcpcd(8) $ systemctl status NetworkManager ● NetworkManager.service - Network Manager Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled) Drop-In: /usr/lib/systemd/system/NetworkManager.service.d └─10-dhcpcd.conf Active: active (running) since Mon 2023-03-27 17:36:29 BST; 15h ago Docs: man:NetworkManager(8) Main PID: 402 (NetworkManager) Tasks: 3 (limit: 1472) CPU: 4.121s CGroup: /system.slice/NetworkManager.service └─402 /usr/sbin/NetworkManager --no-daemon
Example: $ nmcli device DEVICE TYPE STATE CONNECTION wlp5s0 wifi connected MY_WIRELESS_CONN enp0s3 ethernet unavailable -- lo loopback unmanaged -- Device: $ nmcli device DEVICE TYPE STATE CONNECTION eth0 ethernet connected Wired connection 1 wlan0 wifi disconnected -- p2p-dev-wlan0 wifi-p2p disconnected -- lo loopback unmanaged --
Rename connection
$ nmcli conn NAME UUID TYPE DEVICE Wired connection 1 42dd98b3-6bb3-39d4-8b9c-0b9575aafdce ethernet eth0 ZHAW1 97dace42-85f3-4dd7-81a2-f18d7c4132a7 wifi -- $ sudo nmcli connection modify Wired\ connection\ 1 con-name ZHAW_eth0 $ sudo nmcli connection modify ZHAW1 con-name ZHAW_wifi $ nmcli conn show NAME UUID TYPE DEVICE ZHAW_eth0 42dd98b3-6bb3-39d4-8b9c-0b9575aafdce ethernet eth0 ZHAW_wifi 97dace42-85f3-4dd7-81a2-f18d7c4132a7 wifi --
Remove entry
nmcli command does not remove ipv4.gateway setting
$ sudo nmcli con edit id ZHAW_wifi nmcli> remove 802-1x.anonymous-identity nmcli> save Connection 'ZHAW_wifi' (97dace42-85f3-4dd7-81a2-f18d7c4132a7) successfully updated. nmcli> print 802-1x.anonymous-identity 802-1x.anonymous-identity: (null)
Ethernet 802.1x
802.1x with NetworkManager using nmcli
nmcli device nmcli device show eth0 nmcli connection show nmcli connection show id "Wired connection 1" nmcli connection edit "Wired connection 1"
# nmcli con edit CONNECTION_NAME nmcli> set ipv4.method auto nmcli> set 802-1x.eap peap nmcli> set 802-1x.identity <USERNAME> nmcli> set 802-1x.phase2-auth mschapv2 nmcli> set 802-1x.password <PASSWORD> (one option) nmcli> save nmcli> quit other option: /etc/NetworkManager/system-connections/CONNECTION_NAME [connection] id=CONNECTION_NAME [802-1x] password=YOUR_8021X_PASSWORD systemctl restart NetworkManager nmcli con down CONNECTION_NAME nmcli con up CONNECTION_NAME
Wifi 802.1x
Connect to a WPA2-Enterprise Connection via CLI (no desktop)
$ nmcli radio wifi enabled $ nmcli device wifi list IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY 00:DF:1D:0C:B7:02 ZHAW-lowband Infra 1 260 Mbit/s 57 ▂▄▆_ WPA2 802.1X 00:DF:1D:0C:B7:04 eduroam Infra 1 260 Mbit/s 57 ▂▄▆_ WPA2 802.1X $ nmcli con add type wifi ifname wlan0 con-name ZHAW_wifi ssid ZHAW-lowband Error: Failed to add 'ZHAW_wifi' connection: Insufficient privileges $ sudo nmcli con add type wifi ifname wlan0 con-name ZHAW_wifi ssid ZHAW-lowband $ sudo nmcli con edit id ZHAW_wifi ===| nmcli interactive connection editor |=== Editing existing '802-11-wireless' connection: 'ZHAW_wifi' Type 'help' or '?' for available commands. Type 'print' to show all the connection properties. Type 'describe [<setting>.<prop>]' for detailed property description. You may edit the following settings: connection, 802-11-wireless (wifi), 802-11-wireless-security (wifi-sec), 802-1x, ethtool, match, ipv4, ipv6, hostname, tc, proxy nmcli> set ipv4.method auto nmcli> set 802-1x.eap peap nmcli> set 802-1x.phase2-auth mschapv2 nmcli> set 802-1x.identity <USERNAME> nmcli> set 802-1x.password <PASSWORD> nmcli> save Connection 'ZHAW_wifi' (97dace42-85f3-4dd7-81a2-f18d7c4132a7) successfully updated. nmcli> activate Monitoring connection activation (press any key to continue) \ connecting (configuring) Error: Connection activation failed. Passwords or encryption keys are required to access the wireless network 'ZHAW-lowband'. \ connecting (need authentication) nmcli> quit