Blame
Date:
Thu Jan 27 05:00:26 2022
UTC
Message:
Daily backup
11
2021-12-17
text=(:title login.conf:)%0a%0a!! Troubleshooting%0a%0aSuppose /etc/login.conf and /etc/login.conf.db are missing or were deleted. You might see this error:%0a%0a[@%0aOpenBSD/amd64 (example.ircnow.org) (tty00)%0a%0alogin: root%0alogin: Failure to retrieve default class%0a@]%0a%0aThe way to fix this is to reboot the system into [[openbsd/singleuser|single user mode]] as described in the [[https://www.openbsd.org/faq/faq8.html#LostPW|OpenBSD FAQ]]:%0a%0a[@%0a$ vmctl stop username%0astopping vm user: requested to shutdown vm 11%0a$ vmctl start username%0avmctl: started vm 11 successfully, tty /dev/ttypa%0a@]%0a%0aYou then have to quickly load the console before the system boots:%0a%0a[@%0acoconut$ vmctl console username%0aConnected to /dev/ttypa (speed 115200)%0aUsing drive 0, partition 3.%0aLoading......%0aprobing: pc0 com0 mem[638K 510M a20=on]%0adisk: hd0+%0a>> OpenBSD/amd64 BOOT 3.52%0a/%0acom0: 115200 baud%0aswitching console to com0%0a>> OpenBSD/amd64 BOOT 3.52%0a@]%0a%0a(Hint: You may want to press some alphanumeric letters on your keyboard to prevent automatic bootup, then delete them)%0a%0aType @@boot -s@@ to boot into single user mode:%0a%0a[@%0aboot> boot -s%0a...%0acom0: console%0avscsi0 at root%0ascsibus3 at vscsi0: 256 targets%0asoftraid0 at root%0ascsibus4 at softraid0: 256 targets%0aroot on sd0a (6dd62d70bdd3bab6.a) swap on sd0b dump on sd0b%0aEnter pathname of shell or RETURN for sh:%0a@]%0a%0aPress enter to continue:%0a%0a[@%0a# mount -rw /%0a# mount /usr%0a# export TERM=xterm%0a# vi /etc/login.conf%0a@]%0a%0aHere we are mounting the root partition as read-write (previously it was read-only). Then, we mount /usr in order to have access to basic system utilities. Then, we set the terminal type, then edit /etc/login.conf.%0a%0aYou can grab the default login.conf from [[https://cvsweb.openbsd.org/|CVSWeb]], following the src -> etc -> etc.amd64 -> login.conf -> [[https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/etc/etc.amd64/login.conf?rev=1.18&content-type=text/plain|Revision 1.18 download link]]. Copy paste this into /etc/login.conf, save, then quit.%0a%0a[@%0a# cap_mkdb /etc/login.conf%0a# shutdown -r now %0a@]%0a%0aNow, log in as usual.
15
2021-12-17
diff:1610212591:1610210381:=1,6d0%0a%3c (:title login.conf:)%0a%3c %0a%3c !! Troubleshooting%0a%3c %0a%3c Suppose /etc/login.conf and /etc/login.conf.db are missing or were deleted. You might see this error:%0a%3c %0a8,9c2,3%0a%3c OpenBSD/amd64 (example.ircnow.org) (tty00)%0a%3c %0a---%0a> OpenBSD/amd64 (siva.us5.ircnow.org) (tty00)%0a> %0a12,19c6,13%0a%3c @]%0a%3c %0a%3c The way to fix this is to reboot the system into [[openbsd/singleuser|single user mode]] as described in the [[https://www.openbsd.org/faq/faq8.html#LostPW|OpenBSD FAQ]]:%0a%3c %0a%3c [@%0a%3c $ vmctl stop username%0a%3c stopping vm user: requested to shutdown vm 11%0a%3c $ vmctl start username%0a---%0a> %0a> The way to fix this is to reboot the system into single user mode:%0a> %0a> https://www.openbsd.org/faq/faq8.html#LostPW%0a> %0a> coconut$ vmctl stop siva%0a> stopping vm siva: requested to shutdown vm 11%0a> coconut$ vmctl start siva %0a21,22c15%0a%3c @]%0a%3c %0a---%0a> %0a25,26c18%0a%3c [@%0a%3c coconut$ vmctl console username%0a---%0a> coconut$ vmctl console siva%0a37,43d28%0a%3c @]%0a%3c %0a%3c (Hint: You may want to press some alphanumeric letters on your keyboard to prevent automatic bootup, then delete them)%0a%3c %0a%3c Type @@boot -s@@ to boot into single user mode:%0a%3c %0a%3c [@%0a44a30%0a> %0a45a32%0a> %0a53,57c40,42%0a%3c @]%0a%3c %0a%3c Press enter to continue:%0a%3c %0a%3c [@%0a---%0a> %0a> Press enter to continue%0a> %0a62,68c47,59%0a%3c @]%0a%3c %0a%3c Here we are mounting the root partition as read-write (previously it was read-only). Then, we mount /usr in order to have access to basic system utilities. Then, we set the terminal type, then edit /etc/login.conf.%0a%3c %0a%3c You can grab the default login.conf from [[https://cvsweb.openbsd.org/|CVSWeb]], following the src -> etc -> etc.amd64 -> login.conf -> [[https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/etc/etc.amd64/login.conf?rev=1.18&content-type=text/plain|Revision 1.18 download link]]. Copy paste this into /etc/login.conf, save, then quit.%0a%3c %0a%3c [@%0a---%0a> I noticed this file is completely missing!%0a> %0a> So, I go to %0a> %0a> https://cvsweb.openbsd.org/%0a> %0a> src -> etc -> etc.amd64 -> login.conf -> Revision 1.18 download%0a> %0a> https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/etc/etc.amd64/login.conf?rev=1.%0a> 18&content-type=text/plain%0a> %0a> Copy paste that into /etc/login.conf, save, then quit.%0a> %0a71,73c62%0a%3c @]%0a%3c %0a%3c Now, log in as usual.%0a\ No newline at end of file%0a---%0a> @]%0a\ No newline at end of file%0a
18
2021-12-17
diff:1610210381:1610210326:=1d0%0a%3c [@%0a62d60%0a%3c @]%0a\ No newline at end of file%0a
21
2021-12-17
diff:1610210326:1610210326:=1,60d0%0a%3c OpenBSD/amd64 (siva.us5.ircnow.org) (tty00)%0a%3c %0a%3c login: root%0a%3c login: Failure to retrieve default class%0a%3c %0a%3c The way to fix this is to reboot the system into single user mode:%0a%3c %0a%3c https://www.openbsd.org/faq/faq8.html#LostPW%0a%3c %0a%3c coconut$ vmctl stop siva%0a%3c stopping vm siva: requested to shutdown vm 11%0a%3c coconut$ vmctl start siva %0a%3c vmctl: started vm 11 successfully, tty /dev/ttypa%0a%3c %0a%3c You then have to quickly load the console before the system boots:%0a%3c %0a%3c coconut$ vmctl console siva%0a%3c Connected to /dev/ttypa (speed 115200)%0a%3c Using drive 0, partition 3.%0a%3c Loading......%0a%3c probing: pc0 com0 mem[638K 510M a20=on]%0a%3c disk: hd0+%0a%3c >> OpenBSD/amd64 BOOT 3.52%0a%3c /%0a%3c com0: 115200 baud%0a%3c switching console to com0%0a%3c >> OpenBSD/amd64 BOOT 3.52%0a%3c boot> boot -s%0a%3c %0a%3c ...%0a%3c %0a%3c com0: console%0a%3c vscsi0 at root%0a%3c scsibus3 at vscsi0: 256 targets%0a%3c softraid0 at root%0a%3c scsibus4 at softraid0: 256 targets%0a%3c root on sd0a (6dd62d70bdd3bab6.a) swap on sd0b dump on sd0b%0a%3c Enter pathname of shell or RETURN for sh:%0a%3c %0a%3c Press enter to continue%0a%3c %0a%3c # mount -rw /%0a%3c # mount /usr%0a%3c # export TERM=xterm%0a%3c # vi /etc/login.conf%0a%3c I noticed this file is completely missing!%0a%3c %0a%3c So, I go to %0a%3c %0a%3c https://cvsweb.openbsd.org/%0a%3c %0a%3c src -> etc -> etc.amd64 -> login.conf -> Revision 1.18 download%0a%3c %0a%3c https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/etc/etc.amd64/login.conf?rev=1.%0a%3c 18&content-type=text/plain%0a%3c %0a%3c Copy paste that into /etc/login.conf, save, then quit.%0a%3c %0a%3c # cap_mkdb /etc/login.conf%0a%3c # shutdown -r now %0a