The officially official Devuan Forum!

You are not logged in.

#1 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 21:34:07

Logged in as root, I changed username with usermod, copy paste of old username from /etc/passwd, then change of password with passwd.

Thank you all!

I could do with a graphical keyboard or character map to type the dead letters until I have the new keyboard.

#2 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 20:57:00

@aitor

After using the passwd -R command
I followed your excellent step-by-step description, exited the chrooted system and unmounted /mnt.

(Without the exit it didn't work.)

#3 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 20:35:46

ralph.ronnquist wrote:

Apparently passwd has built-in chroot

# passwd -R /mnt

You're a genius !!!!!!

#4 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 19:12:05

Kelsoo wrote:

Just copy all the required text from an existing document or website in to a text file and delete what you need until you have your password in the file.

su  select the text and middle click in the terminal press enter not return

edit: Then change your password :-)

Sorry if I'm being dense. I can only get into single user mode.

You mean su into root or my personal user from

I don't have a file containing the word but I could find a b somewhere.

#5 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 17:30:44

Kelsoo wrote:

What's wrong with copying and pasting your password in?

How? Where do I copy it from?

The ultimate goal is to change my personal user name and password, both of which contain b and n, the dead letters.

#6 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 17:26:14

aitor wrote:

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

.

I probably need some of this.
But how do I type bind?

#7 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 16:39:26

Next problem:

chroot /mnt

Error:

/bin/sh: 0: can't access tty: job control turned off

#8 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 16:29:36

The linux line on the boot screen specifies ro.
That needs to be changed to rw.

Once booted into single user mode, I executed

mount /dev/sda2 /mnt

No more read-only warning! wink
Mounted with write access.

#9 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 16:18:47

Even more simple:

Can I run firefox in single user mode?

Or can I just do command line stuff?

Literally, that's all I want in the short term until I have a new keyboard.

#10 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 16:16:52

ralph.ronnquist wrote:

You might need to run /sbin/fsck -y /dev/sda2 or /sbin/fsck.ext4 -y /dev/sda2 to mount it rw.

I tried this. Came back as clean.

Then

mount -o rw /dev/sda2 /mnt

Warning: source write-protected, mounted read-only

Any more ideas to mount read write?

#11 Re: Other Issues » [SOLVED] Need to reset root password » 2021-12-01 15:01:53

Élisabeth wrote:

What about

mount  -o remount,rw /

I can use wildcards for the mount command, but how do I type remount without n ?

#13 Re: Other Issues » [SOLVED] Need to reset root password » 2021-11-30 22:02:12

I mounted at /mnt.
I can't create /A because the file system is read-only.

#14 Re: Other Issues » [SOLVED] Need to reset root password » 2021-11-30 21:58:23

ralph.ronnquist wrote:

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

This is a task for creative minds.

My command worked as is without echo.

Read-only mount is the problem now.

#15 Re: Other Issues » [SOLVED] Need to reset root password » 2021-11-30 21:55:11

Altoid wrote:

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.

#16 Re: Other Issues » [SOLVED] Need to reset root password » 2021-11-30 21:47:50

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.

#17 Re: Other Issues » [SOLVED] Need to reset root password » 2021-11-30 21:25:14

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. wink

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.

#18 Re: Other Issues » [SOLVED] Need to reset root password » 2021-11-30 21:14:03

Altoid wrote:
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.

#19 Re: Other Issues » [SOLVED] Need to reset root password » 2021-11-30 07:07:56

aitor wrote:

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.

#20 Re: Other Issues » [SOLVED] Need to reset root password » 2021-11-29 21:22:59

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 with

init=/bin/bash

I don't have n and b !

#21 Re: Other Issues » [SOLVED] Need to reset root password » 2021-11-29 19:56:45

PedroReina wrote:

How about having your instalation media still around and using it in rescue mode?

Would that enable me to change my username and password?

#24 Other Issues » [SOLVED] Need to reset root password » 2021-11-29 18:48:16

Élisabeth
Replies: 44

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.

#25 Re: Desktop and Multimedia » incorrect screen size and keyboard not working after lid closure » 2021-10-05 19:55:54

This only happens following lid action.
If I suspend or lock screen manually, I am presented with a visible password dialog on resume.
If I switch Security Lock screen off, the problem does not occur.

When testing my irrelavant grub config changes yesterday, I got the password dialog, which led me to believe they changes had been successful. However, this seems to happen occasionally when the lid is  closed and opened quickly.

Board footer

Forum Software