[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#784755: network-console: Crops password after first space



Cyril Brulebois <kibi@debian.org> (2015-05-08):
> Hi Christoph,
> 
> Christoph Egger <christoph@debian.org> (2015-05-08):
> > Package: network-console
> > Severity: important
> > 
> > Hi!
> > 
> >   I have a jessie d-i here (some rc only, but I don't see any relevant
> > changes since then) and it seems the password for the networkconsole
> > user is cropped after the first space when entering into the d-i
> > dialog?
> 
> Could be. From a quick look at debian/network-console.postinst, excerpts:
> | while [ ! -f "$AUTHORIZED_KEYS_FILE" ] && [ -z "$PASSWORD" ]; do
> |         db_input critical $TEMPLATE_ROOT/password || true
> |         COMPARE_PW=''
> |         db_input high $TEMPLATE_ROOT/password-again && COMPARE_PW=1 || true
> |         db_go
> | 
> |         db_get $TEMPLATE_ROOT/password
> |         INST_PW="$RET"
> |         if [ -z "$INST_PW" ]; then
> |                 db_input critical $TEMPLATE_ROOT/password-empty
> |                 continue
> |         fi
> |         db_get $TEMPLATE_ROOT/password-again
> |         if [ "$COMPARE_PW" ] && [ "$INST_PW" != "$RET" ]; then
> |                 db_input critical $TEMPLATE_ROOT/password-mismatch
> |                 continue
> |         fi
> |         PASSWORD=$INST_PW
>           ^^^^^^^^^^^^^^^^^
> | 
> |         db_set $TEMPLATE_ROOT/password ""
> |         db_set $TEMPLATE_ROOT/password-again ""
> |         db_fset $TEMPLATE_ROOT/password seen false
> |         db_fset $TEMPLATE_ROOT/password-again seen false
> | done
> 
> Any chance you could add quotes there and see whether that fixes your issue?

Ansgar pointed out on IRC the culprit is probably this instead:

	echo "installer:$(gen-crypt $PASSWORD):1:0:99999:7:::" >> /etc/shadow


Mraw,
KiBi.

Attachment: signature.asc
Description: Digital signature


Reply to: