Anleitung zum Wiederherstellen des Kennworts für das OS10-System
Summary: In einigen Situationen vergessen Nutzer möglicherweise das Kennwort sowohl für den OS10-Nutzer "admin" als auch für den Linux-Nutzer "linuxadmin", was dazu führt, dass sich Nutzer nicht bei OS10 anmelden können. ...
Instructions
Für die Kennwortwiederherstellung müssen Wartungsfenster geplant werden, da der Switch während der Aktivität mehrmals (dreimal oder mehr) neu gestartet werden muss.
Das OS10-Benutzerhandbuch enthält ein ähnliches Verfahren zur Behebung dieser Situation unter "Troubleshooting bei OS10". Wenn sowohl das OS10-Nutzerkennwort (admin) als auch das Linux-Administratorkennwort (linuxadmin) vergessen wurden, muss das linuxadmin-Kennwort zuerst aus GRUB wiederhergestellt werden.
Dann kann das OS10-Benutzerkennwort (admin) von linuxadmin aus dem Linux-Kernel wiederhergestellt werden.
Wenn nur das OS10-Nutzerkennwort (Admin) vergessen wurde, ist der Vorgang einfacher, da keine Konsole erforderlich ist. Melden Sie sich über SSH oder Telnet beim Linux-Kernel mit linuxadmin an und setzen Sie dann das Admin-Nutzerkennwort zurück.
Sie müssen das Wartungsfenster anwenden, um die folgenden Vorgänge auszuführen, da Sie den Switch während der Kennwortwiederherstellung mehrmals (dreimal oder mehr) neu starten müssen.
Schritt 1: Stellen Sie eine Verbindung zum seriellen Konsolenanschluss her.
Legen Sie die seriellen Einstellungen auf 115200 Baudrate, 8 Datenbits und keine Parität fest.
Starten Sie den Switch neu, indem Sie ihn ausschalten und wieder einschalten.
Schritt 2 Drücken Sie E , während Sie die folgende Ausgabe erhalten, um das OS10 GRUB-Editor-Menü zu öffnen:

Wenn es sich um eine neuere Version handelt, z. B. 10.5.2.x oder höher, wird Folgendes angezeigt.

Wenn es sich um eine ältere Version handelt, z. B. 10.5.0.x oder früher, wird Folgendes angezeigt.

Schritt 3: Nehmen Sie die folgenden Änderungen vor, um das Startverhalten festzulegen:
Wenn es sich um eine neuere Version handelt, z. B. 10.5.2.x oder höher, verwenden Sie die Pfeiltasten, um an das Ende der Zeile zu springen, die set os_debug_args=, und fügen Sie dann init=/bin/bash bis zum Ende.

Wenn es sich um eine ältere Version handelt, z. B. 10.5.0.x oder früher, verwenden Sie die Pfeiltasten, um an das Ende der Zeile zu springen, die mit "linux" beginnt, und fügen Sie dann Folgendes hinzu: init=/bin/bash am Ende der Linie.

Starten Sie den Switch neu, indem Sie Strg + x oder Alt + 0 drücken (0 ist die Zahl Null). Das System startet in die Root Shell (OS10 Linux-Kernel) OHNE Kennwort.
Wenn es sich um eine neuere Version handelt, z. B. 10.5.2.x oder höher:
Booting a command list Loading OS10 ... AF, DXE_EXIT_BOOT_SERVICES(03101019) B0, B1, [ 1.193068] intel_rapl: driver does not support CPU family 6 model 77 bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell root@OS10:/#

Wenn es sich um eine ältere Version handelt, z. B. 10.5.0.x oder früher:

Schritt 4: Überprüfen Sie den Status des Linux-Nutzers "linuxadmin":
root@OS10:/# root@OS10:/# cat /etc/passwd | grep linuxadmin linuxadmin:x:1000:1000:,,,:/home/linuxadmin:/bin/bash ------// if there's NO "/bin/bash", reset it with below command, root@OS10:/# root@OS10:/# usermod -s /bin/bash linuxadmin ------// reset the login shell mode, usermod: no changes ------// it's already correct, so no changes, root@OS10:/#
Überprüfen Sie, ob der Linux-Nutzer "linuxadmin" gesperrt ist, und entsperren Sie ihn, wenn dies der Fall ist.
root@OS10:/# root@OS10:/# passwd -S linuxadmin linuxadmin L 07/22/2022 0 99999 7 -1 ------// 'L' means user locked, root@OS10:/# root@OS10:/# passwd -u linuxadmin ------// unlock the user, passwd: password expiry information changed. root@OS10:/# root@OS10:/# passwd -S linuxadmin ------// check again, it's correct user status, linuxadmin P 07/22/2022 0 99999 7 -1 root@OS10:/#
Schritt 5: Setzen Sie das Kennwort für den Linux-Nutzer "linuxadmin" zurück.
root@OS10:/# root@OS10:/# passwd linuxadmin ------// reset user "linuxadmin" password, New password: <reset password with the user name : linuxadmin> Retype new password: <retype new password : linuxadmin> passwd: password updated successfully root@OS10:/# root@OS10:/# sync ------// synchronize system to save the new password, root@OS10:/# After password recovery done, please remember to reset the linuxadmin password manually in running-configurations later as below : OS10(config)# system-user linuxadmin password [retype your new password] OS10(config)# exit OS10# write memory OS10# Another preferred method is to use script as below : Notes : the script will also update the new linuxadmin password in "startup.xml". If the OS10 version is 10.5.1.0, then run the following command. root@OS10: /# sed -ibak '31,41s/^/#/g' /opt/dell/os10/ bin/recover_linuxadmin_password.sh Configure the password by using the script command : root@OS10:/# /opt/dell/os10/bin/recover_linuxadmin_password.sh [plainpassword] Notes: Enter the linuxadmin password in plain text. For example : root@OS10:/# /opt/dell/os10/bin/recover_linuxadmin_password.sh P@ssw0rd123! root@OS10:/# root@OS10:/# sync ------// synchronize system to save the new password, root@OS10:/#
Schritt 6: Erzwingen Sie einen erneuten Neustart des Systems.
root@OS10:/# root@OS10:/# reboot -f ------// force switch to reboot, Rebooting. [ 417.428659] reboot: Restarting system 15, 00068001, 19, 00068000, BIOS Boot Selector for S4100 Version 3.33.0.1-12 ...<output omitted>... Then try login with Linux user "linuxadmin" and new password "linuxadmin" as below. OS10 login: linuxadmin Password: linuxadmin Linux OS10 4.19.208 #1d SMP Debian 4.19.208-1 x86_64 ...<output omitted>... linuxadmin@OS10:~$ ------// login to the kernel shell mode directly, password recovered successfully to the default (the same as user name),

Melden Sie sich erfolgreich mit dem Nutzer "linuxadmin" beim Linux-Kernel an.
Schritt 7: Setzen Sie das Kennwort für den OS10-Nutzer "admin" zurück.
linuxadmin@OS10:~$ linuxadmin@OS10:~$ sudo -i ------// get the root permission, We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for linuxadmin: root@OS10:~#

root@OS10:~# passwd -S admin ------// check and make sure user status, not locked, admin P 07/25/2022 0 99999 7 -1 root@OS10:~# root@OS10:~# cat /etc/passwd | grep admin ...<output omitted>... admin:x:1003:997::/config/home/admin:/opt/dell/os10/bin/clish ------// check the shell mode and make sure it's "/opt/dell/os10/bin/clish", root@OS10:~# Reset password, root@OS10:~# root@OS10:~# passwd admin New password: <reset the password with user name : admin> BAD PASSWORD: it is too short BAD PASSWORD: is too simple Retype new password: <retype the password : admin> passwd: password updated successfully root@OS10:~#
Schritt 8: Beenden Sie das Programm und versuchen Sie, sich mit dem Nutzer "admin" anzumelden.
OS10 login: admin Password: admin Last login: Mon Jul 25 05:21:56 UTC 2022 on ttyS0 Linux OS10 4.19.208 #1d SMP Debian 4.19.208-1 x86_64 ...<output omitted>... %Warning : Default password for admin account should be changed to secure the system %Warning : Default password for linuxadmin account should be changed to secure the system. OS10# ------// login to the OS10 shell mode, password recovered successfully to the default (the same as user name),

Melden Sie sich erfolgreich mit dem Nutzer "admin" bei der OS10-Shell an.
Beachten Sie die %Warning-Protokolle. Sie sollten ein neues Kennwort Ihrer Wahl festlegen. Behalten Sie das neue Kennwort im Hinterkopf.
Schritt 9: Legen Sie ein neues Kennwort als Benutzer oder Administrator fest.
OS10# OS10# configure terminal OS10(config)# OS10(config)# service simple-password ------// this is optional, if want to set simple password. OS10(config)# OS10(config)# username admin password <input customer's password> role sysadmin OS10(config)# OS10(config)# system-user linuxadmin <input customer's password> linuxadmin OS10(config)# OS10(config)# end OS10# write memory ------// save changed configuration, DO NOT forget the new password !!!! OS10#