Hvordan lage passordgjenoppretting for OS10-systemet
Summary: I noen situasjoner kan brukere glemme passordet for både OS10-bruker "admin" og Linux-bruker "linuxadmin", dette resulterer i at brukere ikke kan logge på OS10.
Instructions
Vedlikehold Windows må planlegges for gjenoppretting av passord fordi svitsjen må startes på nytt flere ganger (tre eller flere) i løpet av aktiviteten.
Brukerveiledningen for OS10 har en lignende fremgangsmåte for å løse denne situasjonen under "Feilsøk OS10". Hvis både OS10-brukerpassord (admin) og Linux admin (linuxadmin) er glemt, må linuxadmin-passordet gjenopprettes først fra GRUB.
Deretter kan OS10-brukerpassordet (admin) gjenopprettes av linuxadmin fra Linux-kjernen.
Hvis bare OS10-brukerpassordet (admin) er glemt, er operasjonen enklere siden ingen konsoll er nødvendig. Logg på Linux-kjernen via SSH eller Telnet med linuxadmin, og tilbakestill deretter administratorbrukerpassordet.
Du må bruke vedlikeholdsvinduet for å utføre følgende operasjoner fordi du starter svitsjen på nytt flere ganger (tre eller flere) under gjenoppretting av passord.
Trinn 1 Koble til den serielle konsollporten.
Angi serielle innstillinger 115200 baudrate, 8 databiter og ingen paritet.
Start bryteren på nytt ved å slå av bryteren og deretter slå på bryteren.
Trinn 2 Trykk på E mens du får utgangen nedenfor for å åpne OS10 GRUB-redigeringsmenyen:

Hvis det er en nyere versjon, si 10.5.2.x eller nyere, ses nedenfor.

Hvis det er en eldre versjon, si 10.5.0.x eller tidligere, ses nedenfor.

Trinn 3 Gjør følgende endringer for å angi oppstartsatferd:
Hvis det er en nyere versjon, si 10.5.2.x eller nyere, bruker du piltastene til å flytte til slutten av linjen som har set os_debug_args=, og legg deretter til init=/bin/bash til slutt.

Hvis det er en eldre versjon, si 10.5.0.x eller tidligere, bruk piltastene til å flytte til slutten av linjen som starter med "linux", og legg deretter til init=/bin/bash på slutten av linjen.

Start bryteren på nytt ved å trykke Ctrl + x eller Alt + 0 (0 er nummer null). Systemet starter opp i rotskallet (OS10 linuxkjernen) UTEN passord.
Hvis det er en nyere versjon, si 10.5.2.x eller nyere:
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:/#

Hvis det er en eldre versjon, si 10.5.0.x eller tidligere:

Trinn 4 Sjekk Linux-brukeren "linuxadmin" status:
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:/#
Sjekk om Linux-brukeren "linuxadmin" er låst, og lås den opp hvis den er det.
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:/#
Trinn 5: Tilbakestill passordet for Linux-bruker "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:/#
Trinn 6 Tving omstart av systemet igjen.
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),

Logg på Linux-kjernen med brukeren "linuxadmin".
Trinn 7: Tilbakestill passordet for OS10-brukeren "admin".
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:~#
Trinn 8: Avslutt og prøv å logge på med brukeren "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),

Logg på OS10-skallet med brukeren "admin".
Legg merke til %Warning-loggene, du bør angi et nytt passord du selv velger. Husk det nye passordet.
Trinn 9: Angi et nytt passord som brukere eller administrator.
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#