You are not logged in.
Actually, I need creative ideas to work around a keyboard problem, which has locked me out of my laptop:
I spilt water on my keyboard three days ago and the letters b and n are no longer working.
I can't log in now because my username and passwords contain b.
I wanted to log in as root to change those but the root password contains a b too.
I found instructions how to reset the root password on Debian. But this requires typing init=/bin/bash on grub.
Any ideas for a temporary workaround?
I have no USB keyboard nor friends who have one. I live in the sticks without ready access to shops.
I just need a smart idea.
Offline
How about ssh from another machine?
Brianna Ghey — Rest In Power
Offline
That's my only machine.
Offline
How about having your instalation media still around and using it in rescue mode?
Offline
Change to another keyboard layout ?
Offline
How about having your instalation media still around and using it in rescue mode?
Would that enable me to change my username and password?
Offline
There is a way to do it from the boot screen by editing the kernel line. bluesdog has a howto over on the debian forum that I have used but it may be outdated by now. I would copy some notes that I have here but don't trust their accuracy because I haven't had to do it in years . . .
Offline
Run a live system and find out the device /dev/sdXY where the root partition (/) of your devuan installation is on. XY are the drive letter and the partition number. If you are not sure which it is, you can run lsblk -o name,mountpoint for that. In my case:
NAME MOUNTPOINT
sda
|-sda1 /
|-sda2
|-sda5 /home
`-sda6 [SWAP]
Mount the partition as root (the root filesystem is usually a ext4 partition):
# mount -t ext4 /dev/sda1 /mnt
Now bind the directories:
# mount -o bind /sys /mnt/sys
# mount -t proc proc /mnt/proc
# mount -o bind /dev /mnt/dev
# mount -o bind /dev/pts /mnt/dev/pts
If you are going to change only root's password, this step is superfluous, but some other tasks might require it. For example, if you want to restore the grub, the above binding will provide access to detect other operating systems.
Chroot the partition:
# chroot /mnt
At this point you can give a new password for root (for example, babylon ):
# passwd
New password:
Retype new password:
passwd: password updated successfully
To end with, exit the chrooted system and unmount all the directories:
# exit
# umount /mnt/dev/pts
# umount /mnt/dev
# umount /mnt/proc
# umount /mnt/sys
# umount /mnt
You have just changed root's password.
Last edited by aitor (2021-11-29 21:24:07)
If you work systematically, things will come by itself (Lev D. Landau)
Offline
The OP has already explained that the "b" & "n" keys don't work.
Using rescue mode from the Devuan ISO image is the correct solution because that only requires menu inputs to obtain a root shell in the installed system.
Now bind the directories
The arch-install-scripts package includes the arch-chroot command which will (bind) mount the API filesystems automagically.
Brianna Ghey — Rest In Power
Offline
There is a way to do it from the boot screen by editing the kernel line. bluesdog has a howto over on the debian forum that I have used but it may be outdated by now. I would copy some notes that I have here but don't trust their accuracy because I haven't had to do it in years . . .
Yes, that's what I tried.
The linux line has to be appended with
init=/bin/bash
I don't have n and b !
Offline
golinux wrote:There is a way to do it from the boot screen by editing the kernel line. bluesdog has a howto over on the debian forum that I have used but it may be outdated by now. I would copy some notes that I have here but don't trust their accuracy because I haven't had to do it in years . . .
Yes, that's what I tried.
The linux line has to be appended withinit=/bin/bash
I don't have n and b !
In a live system you can copy and paste them from anywhere.
If you work systematically, things will come by itself (Lev D. Landau)
Offline
Now bind the directories
You are right, but the mistake was below, at the end of the post:
To end with, exit the chrooted system and unmount all the partitions:
Fixed it. Thanks
If you work systematically, things will come by itself (Lev D. Landau)
Offline
aitor wrote:Now bind the directories
You are right, but the mistake was below, at the end of the post:
To end with, exit the chrooted system and unmount all the partitions:
Fixed it. Thanks
Head_on_a_stick: i misunderstood you, you were quoting the phrase in reference to the arch-install-scripts package. Well..., fixed anyway. They are directories.
If you work systematically, things will come by itself (Lev D. Landau)
Offline
Yes, as said, if you have a Devuan ISO (any of them), then its "Advanced -> Rescue" option is the way to go; it'll bring you all the way into a root login within your root file system without needing working b or n.
Once there, you use the command "passwd" to set a new root password.
Thereafter you have to figure out how to deal with that the username has a b. Perhaps create a new user, or perhaps work out how to remap some keypad keys (or other keys) to be b and n.
Offline
In a live system you can copy and paste them from anywhere.
I have a Devuan installation ISO, not live. (I wish I knew where I put it.)
And I think I have a Debian live.
I think a new keyboard is inevitable. If it hasn't dried after three days I don't hold out much hope.
But I'm looking for this interim solution because finding the right one for this laptop might take a bit - a backlit french AZERTY.
Offline
I have a Devuan installation ISO, not live. (I wish I knew where I put it.)
Yes, that one you can start into "rescue"; just make sure you stop before partitioning.
And I think I have a Debian live.
A Debian live should also work if you can operate that without the broken keys; if you get a root prompt in a terminal, you might be able to do
# mkdir /A
# mou<TAB> /dev/sda1 /A
# chroot /A $(which passwd)
and then reboot into that system.
If the mou<TAB> is ambiguous a double <TAB> will yield the options for you to copy and paste from.
Note that maybe your root file system is not on /dev/sda1 of course .. you'll find out.
Offline
Chimaera: On my lightdm login screen I have a small icon in the middle of the bottom that opens a screen keyboard that can be operated with the mouse. Maybe that helps.
rolfie
Offline
you dont need to use init=/bin/bash just put a number 1 where that is supposed to go at the end of the kernel parameter and press F10 to boot. This brings you into maintenance mode or single user mode. But it still doesn't solve your issue of the b key not working. Definitely seems like you need a live session as has been mentioned previously.
Offline
Hello:
How about ssh from another machine?
That's my only machine.
I'm sorry, maybe I've missed something.
Couldn't you try to ssh from the machine you are writing from now?
I am obviously assuming that it is not your laptop and that whatever machine you are using to post has an available ethernet port you can access.
Best,
A.
Last edited by Altoid (2021-11-30 21:04:09)
Offline
Head_on_a_Stick wrote:How about ssh from another machine?
Élisabeth wrote:That's my only machine.
Couldn't you try to ssh from the machine you are writing from now?.
I'm typing on my mobile phone. And it's a pain in the back.
Offline
I never found my Devuan USB and didn't get anywhere with the Debian USB installation stick.
But I got into single user mode via the boot screen.
I managed to type
init=/bin/bash
by copying and pasting the broken letters with Emacs commands.
Now I'm struggling to autocomplete the mount command because there are several in /bin and /sbin
It also thinks I have a QUERTY keyboard but I roughly remember where the keys are.
Offline
Hello:
... on my mobile phone.
I see.
Don't have one of those so it did not ocurr to me.
I use an old Blackberry 9320. 8^ )
And it's a pain in the back.
Yes.
I can relate to that.
Is it an android device?
Best,
A.
Offline
I can type the mount command
/?i?/mou?t /de?/sda2 /m?t
The v is broken now too.
I'm getting the warning that the source is write protected and mounted read only.
Offline
How about using backquote with echo to make use of globbing, e.g.
# `echo /?i?/mou?t` /dev/sda1 /A
EDIT: actually might not need backquoting even:
# /?i?/mou?t /dev/sda1 /A
Offline
Is it an android device?
Yes, no Apple or Windows in this house.
But as per my previous post, I got into single user mode.
Offline