Bug 294781 - bsdinstall: setting a root password containing backslashes does not work
Summary: bsdinstall: setting a root password containing backslashes does not work
Status: Closed DUPLICATE of bug 294603
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 15.0-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-25 14:54 UTC by Pierre Pronchery
Modified: 2026-04-28 20:16 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Pronchery freebsd_committer freebsd_triage 2026-04-25 14:54:16 UTC
The `rootpass` bsdinstall script escapes backslashes when reading parsing the output of bsddialog(1). They should be taken verbatim instead, as the resulting password set does not match the user's intended input.

A fix is known and already prepared.
Comment 1 commit-hook freebsd_committer freebsd_triage 2026-04-25 14:56:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1566386b90d34dea7f30a0e6b511e178bd0d50b8

commit 1566386b90d34dea7f30a0e6b511e178bd0d50b8
Author:     Lars Engels <lme@FreeBSD.org>
AuthorDate: 2026-04-25 14:41:24 +0000
Commit:     Lars Engels <lme@FreeBSD.org>
CommitDate: 2026-04-25 14:41:24 +0000

    bsdinstall: fix root password prompt with backslashes

    Use "read -r" to set the root password in "bsdinstall rootpass" to
    prevent issues with passwords containing one or more backslash
    characters.

    PR:             294781
    Discussed with: tuexen, crest
    Approved by:    khorben
    MFC after:      3 days
    Event:          Wiesbaden Hackathon 202604

 usr.sbin/bsdinstall/scripts/rootpass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 2 Pierre Pronchery freebsd_committer freebsd_triage 2026-04-25 15:08:16 UTC

*** This bug has been marked as a duplicate of bug 294603 ***
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-04-28 20:16:23 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=44d33ead3d04b51881e7fba0cbed8f66f001280a

commit 44d33ead3d04b51881e7fba0cbed8f66f001280a
Author:     Lars Engels <lme@FreeBSD.org>
AuthorDate: 2026-04-25 14:41:24 +0000
Commit:     Lars Engels <lme@FreeBSD.org>
CommitDate: 2026-04-28 20:15:49 +0000

    bsdinstall: fix root password prompt with backslashes

    Use "read -r" to set the root password in "bsdinstall rootpass" to
    prevent issues with passwords containing one or more backslash
    characters.

    PR:             294781
    Discussed with: tuexen, crest
    Approved by:    khorben
    MFC after:      3 days
    Event:          Wiesbaden Hackathon 202604

    (cherry picked from commit 1566386b90d34dea7f30a0e6b511e178bd0d50b8)

 usr.sbin/bsdinstall/scripts/rootpass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)