Hoe wachtwoordherstel voor OS10-systeem te maken
Summary: In sommige situaties kunnen gebruikers het wachtwoord vergeten voor zowel OS10-gebruiker "admin" als Linux-gebruiker "linuxadmin", waardoor gebruikers zich niet kunnen aanmelden bij OS10. ...
Instructions
Onderhoud Windows moet worden gepland voor wachtwoordherstel, omdat de switch meerdere keren (drie of meer) keer moet worden opgestart tijdens de activiteit.
De gebruikershandleiding van OS10 heeft een vergelijkbare procedure om deze situatie aan te pakken onder "Problemen met OS10 oplossen". Als zowel het OS10 user (admin) als Linux admin (linuxadmin) wachtwoord zijn vergeten, moet het linuxadmin wachtwoord eerst hersteld worden van GRUB.
Vervolgens kan het OS10 gebruikerswachtwoord (admin) door linuxadmin worden hersteld vanuit de Linux-kernel.
Als alleen het OS10-gebruikerswachtwoord (admin) is vergeten, is de bewerking eenvoudiger omdat er geen console nodig is. Meld u via SSH of Telnet aan bij de Linux-kernel met linuxadmin en stel vervolgens het admin-wachtwoord opnieuw in.
U moet het onderhoudsvenster toepassen om de volgende bewerkingen uit te voeren omdat de switch meerdere keren (drie of meer) keer opnieuw moet worden opgestart tijdens het wachtwoordherstel.
Stap 1 Maak verbinding met de seriële consolepoort.
Stel de seriële instellingen in op 115200 baudrate, 8 databits en geen pariteit.
Start de switch opnieuw op door de switch uit te schakelen en vervolgens weer in te schakelen.
Stap 2 Druk op E terwijl u de onderstaande uitvoer krijgt om het OS10 GRUB-editormenu te openen:

Als het een nieuwere versie is, bijvoorbeeld 10.5.2.x of hoger, wordt het onderstaande weergegeven.

Als het een oudere versie is, bijvoorbeeld 10.5.0.x of eerder, wordt het onderstaande weergegeven.

Stap 3 Breng de volgende wijzigingen aan om het opstartgedrag in te stellen:
Als het een nieuwere versie is, bijvoorbeeld 10.5.2.x of hoger, gebruikt u de pijltoetsen om naar het einde van de regel te gaan met set os_debug_args=en voeg vervolgens toe init=/bin/bash tot het einde.

Als het een oudere versie is, bijvoorbeeld 10.5.0.x of eerder, gebruik dan de pijltoetsen om naar het einde van de regel te gaan die begint met 'linux' en voeg vervolgens init=/bin/bash aan het einde van de lijn.

Start de switch opnieuw op door op Ctrl + x of Alt + 0 te drukken (0 is nummer nul). Het systeem start ZONDER wachtwoord op in de root shell (OS10 linux kernel).
Als het een nieuwere versie is, bijvoorbeeld 10.5.2.x of hoger:
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:/#

Als het een oudere versie is, zeg dan 10.5.0.x of eerder:

Stap 4 Controleer de status van de Linux-gebruiker "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:/#
Controleer of de Linux-gebruiker "linuxadmin" is vergrendeld en ontgrendel deze als dit het geval is.
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:/#
Stap 5 Reset het wachtwoord voor Linux-gebruiker "linuxadmin".
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:/#
Stap 6: Forceer het opnieuw opstarten van het systeem.
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),

Meld u aan bij de Linux-kernel met gebruiker "linuxadmin".
Stap 7 Stel het wachtwoord voor OS10-gebruiker "admin" opnieuw in.
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:~#
Stap 8 Sluit af en probeer in te loggen met gebruiker "admin".
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),

Meld u aan bij de OS10-shell met gebruiker "admin".
Let op de %Warning-logboeken, u moet een nieuw wachtwoord van uw eigen keuze instellen. Houd dat nieuwe wachtwoord in gedachten.
Stap 9: Stel een nieuw wachtwoord in als gebruiker of beheerder.
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#