You are not logged in.

#1 2022-04-21 07:31:56

diyfan
Member
Registered: 2022-04-05
Posts: 15

How to set root password in an archiso ?

title

Last edited by diyfan (2022-04-26 08:01:03)

Offline

#2 2022-04-21 10:04:40

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,658
Website

Re: How to set root password in an archiso ?

This does not look like any valid password hash, nor like a valid /etc/passwd entry, which by the way does not contain password hashes per default. Where did you get this line from?
In any case, your password hash is stores in /etc/shadow. If you don't use some exotic hash function, but the defaults, it should be usable on any other up-to-date Linux system.
However, I recommend against copying hashes, since you make the accounts vulnerable to correlation attacks. I.e. an attacker can see the identical hashes an know that you use the same password on multiple machines. Modern hashes use salts to prevent exactly that. By copying the hash, you undermine the whole idea of salts.


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#3 2022-04-21 10:25:12

diyfan
Member
Registered: 2022-04-05
Posts: 15

Re: How to set root password in an archiso ?

schard wrote:

I recommend against copying hashes, since you make the accounts vulnerable to correlation attacks. I.e. an attacker can see the identical hashes an know that you use the same password on multiple machines. Modern hashes use salts to prevent exactly that. By copying the hash, you undermine the whole idea of salts.

Then how am I supposed to set the root password for  the archlinux iso ? ; I can't chroot into it. Also I am trying to set an empty password.

Last edited by diyfan (2022-04-21 10:28:31)

Offline

#4 2022-04-21 10:30:27

diyfan
Member
Registered: 2022-04-05
Posts: 15

Re: How to set root password in an archiso ?

schard wrote:

Where did you get this line from?

from the /etc/shadow file. I made a dummy user and enabled the user by

 bash-5.1# useradd -m  -G audio -s /bin/sh dummy
 bash-5.1# passwd -d dummy 

then

 bash-5.1# cat /etc/shadow 

I also made sure that the password is not different by making an other user like that but it's the same encrypted password.

Last edited by diyfan (2022-04-21 10:38:46)

Offline

#5 2022-04-21 10:43:58

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,205

Re: How to set root password in an archiso ?

you're supposed to create a hash using openssl , then put that hash in the shadow file for the iso.

see https://wiki.archlinux.org/title/Archis … _passwords


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2022-04-23 07:26:07

diyfan
Member
Registered: 2022-04-05
Posts: 15

Re: How to set root password in an archiso ?

It worked; Thanks for all.

Offline

#7 2022-04-23 15:16:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,676

Re: How to set root password in an archiso ?

diyfan:  I stumbled upon this thread this morning, it looks like you removed what you had tried from the first post after this was solved.  Makes sense lest it confuse someone, but it would have been interesting to see what you had tried.  Also, not everyone will understand $(...).  Something to think about.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB