The officially official Devuan Forum!

You are not logged in.

#26 2021-11-30 21:58:23

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

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.

Offline

#27 2021-11-30 22:02:12

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

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

Offline

#28 2021-11-30 22:28:18

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

What about

mount  -o remount,rw /

Last edited by Élisabeth (2021-12-01 15:01:30)

Offline

#29 2021-12-01 04:09:07

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: [SOLVED] Need to reset root password

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

Offline

#30 2021-12-01 10:58:54

Altoid
Member
Registered: 2017-05-07
Posts: 1,581  

Re: [SOLVED] Need to reset root password

Hello:

Élisabeth wrote:

... no Apple or Windows in this house.

8^)

Élisabeth wrote:

... got into single user mode.

Glad you are making progress.

Best,

A.

Last edited by Altoid (2021-12-01 10:59:13)

Offline

#31 2021-12-01 15:01:53

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

Élisabeth wrote:

What about

mount  -o remount,rw /

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

Offline

#32 2021-12-01 16:16:52

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

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?

Offline

#33 2021-12-01 16:18:47

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

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.

Offline

#34 2021-12-01 16:29:36

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

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.

Last edited by Élisabeth (2021-12-01 21:03:35)

Offline

#35 2021-12-01 16:39:25

Kelsoo
Member
Registered: 2016-12-09
Posts: 56  

Re: [SOLVED] Need to reset root password

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

Offline

#36 2021-12-01 16:39:26

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

Next problem:

chroot /mnt

Error:

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

Offline

#37 2021-12-01 17:26:14

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

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?

Offline

#38 2021-12-01 17:30:44

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

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.

Offline

#39 2021-12-01 17:37:03

Kelsoo
Member
Registered: 2016-12-09
Posts: 56  

Re: [SOLVED] Need to reset root password

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 :-)

Last edited by Kelsoo (2021-12-01 17:41:40)

Offline

#40 2021-12-01 19:12:05

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

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.

Offline

#41 2021-12-01 20:10:45

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: [SOLVED] Need to reset root password

Apparently passwd has built-in chroot

# passwd -R /mnt

Offline

#42 2021-12-01 20:35:46

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

ralph.ronnquist wrote:

Apparently passwd has built-in chroot

# passwd -R /mnt

You're a genius !!!!!!

Offline

#43 2021-12-01 20:57:00

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

@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.)

Offline

#44 2021-12-01 21:34:07

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: [SOLVED] Need to reset root password

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.

Offline

#45 2021-12-02 01:43:19

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 230  
Website

Re: [SOLVED] Need to reset root password

Good smile


If you work systematically, things will come by itself (Lev D. Landau)

Offline

Board footer