Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230968 - app-misc/livecd-tools: passwd=foo support broken
Summary: app-misc/livecd-tools: passwd=foo support broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: All ISO (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords:
: 274639 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-06 18:36 UTC by toogle
Modified: 2009-08-06 17:48 UTC (History)
5 users (show)

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


Attachments
password parsing patch (password_parse.patch,319 bytes, patch)
2008-07-07 20:24 UTC, Eric Thibodeau
Details | Diff
parse $x and not $* for password (password_parse.patch,319 bytes, patch)
2008-07-10 00:55 UTC, Eric Thibodeau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description toogle 2008-07-06 18:36:39 UTC
When you're going to install Gentoo Linux 2008.0 via ssh, you typically type
boot: gentoo nox dosshd passwd=foo,
but kernel ignores "passwd=foo" command. So you cannot login to the machine using ssh.

$(uname -r): 2.6.24-gentoo-r5

Reproducible: Always

Steps to Reproduce:
1. boot from 2008.0 installcd/livecd using "dosshd passwd=foo"
2. check that sshd succesfully started - /etc/init.d/sshd status
3. try ssh root@localhost using "foo" as a password

Actual Results:  
Permission denied

Expected Results:  
Login as root
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2008-07-06 20:26:50 UTC
It looks like this new feature in livecd-tools wasn't really tested. In /etc/init.d/autoconfig line 187, it should be:

                PASSWORD="${x/passwd=/}"
Comment 2 Eric Thibodeau 2008-07-07 18:40:14 UTC
I recommend using the following instead:

passwd=*|pass=*|pwd=*|password=*)
    PASSWD="no"
    PASSWORD="${*#*=}"

1- alias to password, false bugs are bound to be caused by these alternate spellings
2- ${*#*=} <<>> this strips up to the first = sign, letting the way to having '=' in the password and or having something as silly as 'password=' as a password :P
Comment 3 Eric Thibodeau 2008-07-07 20:24:14 UTC
Created attachment 159824 [details, diff]
password parsing patch

as per comment #2
Comment 4 Roman v. Gemmeren 2008-07-09 19:38:19 UTC
(In reply to comment #3)
> Created an attachment (id=159824) [edit]
> password parsing patch
> 
> as per comment #2
> 

Comment 5 Roman v. Gemmeren 2008-07-09 19:57:25 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Created an attachment (id=159824) [edit]
> > password parsing patch
> > 
> > as per comment #2
> > 
> 
I tested both of the above solutions, while the 2nd one didn't work ($PASSWORD still empty), the first one worked fine. 
I am no expert, but i think ther eis an error in the syntax -> PASSWORD="${*#*=}".
Comment 6 Eric Thibodeau 2008-07-09 22:33:54 UTC
You're saying the patch didn't work? here is how I tested it:

kyron@kyron ~ $ cat pass.sh
#!/bin/bash
for I in $*
do
        case $I in
        passwd=*|pass=*|pwd=*|password=*)
                PASSWORD="${*#*=}"
                ;;
        esac
done
echo "I got the following as a password: $PASSWORD"
kyron@kyron ~ $ ./pass.sh pass=kasdlfnsdkl=fjk=
I got the following as a password: kasdlfnsdkl=fjk=

...
Comment 7 Eric Thibodeau 2008-07-10 00:52:02 UTC
(In reply to comment #5)
> > 
> I tested both of the above solutions, while the 2nd one didn't work ($PASSWORD
> still empty), the first one worked fine. 
> I am no expert, but i think ther eis an error in the syntax ->
> PASSWORD="${*#*=}".
> 

...woops, I double checked and you were right:
PASSWORD="${*#*=}"
should be:
PASSWORD="${x#*=}"

Sorry about that!
Comment 8 Eric Thibodeau 2008-07-10 00:55:43 UTC
Created attachment 160003 [details, diff]
parse $x and not $* for password

I was parsing $* and not $x ...be damned my test script!
Comment 9 Roman v. Gemmeren 2008-07-11 14:23:24 UTC
(In reply to comment #8)
> Created an attachment (id=160003) [edit]
> parse $x and not $* for password
> 
> I was parsing $* and not $x ...be damned my test script!
> 
Ok, seems to work now as expected.;)

Comment 10 Andrew Gaffney (RETIRED) gentoo-dev 2008-07-24 23:22:41 UTC
The substitution fix has been committed, but the parameter is staying as passwd=
Comment 11 Andrew Gaffney (RETIRED) gentoo-dev 2009-06-22 00:33:12 UTC
*** Bug 274639 has been marked as a duplicate of this bug. ***
Comment 12 Denis Loginov 2009-08-06 17:08:23 UTC
(In reply to comment #10)
> The substitution fix has been committed, but the parameter is staying as
> passwd=
> 
Unfortunately, this bug still remains in install-x86-minimal-20090623.iso
Comment 13 Andrew Gaffney (RETIRED) gentoo-dev 2009-08-06 17:35:28 UTC
This was fixed in livecd-tools-1.0.42.
Comment 14 Denis Loginov 2009-08-06 17:48:04 UTC
(In reply to comment #13)
> This was fixed in livecd-tools-1.0.42.
Indeed, you committed livecd-tools-1.0.42 ebuild on 29 Jun 2009, i.e. later than 2009.06.23 (the date of iso).
Sorry for the false alarm.