Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263848 - 2008.0-r1 autoconfig doesn't recognize passwd= parameter in cmdline
Summary: 2008.0-r1 autoconfig doesn't recognize passwd= parameter in cmdline
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Installer (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Linux Installer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 10:06 UTC by Qiangning Hong
Modified: 2009-05-03 17:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to let autoconfig understand passwd= parameter in cmdline correctly (autoconfig.patch,666 bytes, patch)
2009-03-26 10:09 UTC, Qiangning Hong
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Qiangning Hong 2009-03-26 10:06:55 UTC
/etc/init.d/autoconfig support passwd= parameter in cmdline, but doesn't handle it correctly.

The code says:
...
case "${x}"
      ...
      passwd=*)
          PASSWD="no"
          PASSWORD="$*"
      ;;
...

Here the code wants, i guess, to put the passwd in cmdline into $PASSWORD.  But the code above doesn't work.  So that whatever you set after "passwd=" in cmdline, the root password is always empty.

Reproducible: Always

Steps to Reproduce:
1. change the kernel cmdline, add a passwd=secret in it
2. boot with the changed cmdline
3. check the root password (e.g. via ssh login)

Actual Results:  
the root has no password.  Press enter directly will bring you to logged in status.

Expected Results:  
the root password should be set to "secret"

I'll upload a patch to fix it.
Comment 1 Qiangning Hong 2009-03-26 10:09:04 UTC
Created attachment 186312 [details, diff]
patch to let autoconfig understand passwd= parameter in cmdline correctly

the strlen and parse_opt functions are copied from the initrd of installer cd.
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2009-05-03 17:21:36 UTC
The installer is deprecated.