user-setup produces errors like "[: 86: x*: unexpected operator"

Bug #307443 reported by Uli Heller
Affects Status Importance Assigned to Milestone
user-setup (Ubuntu)
Colin Watson

Bug Description

I've installed Ubuntu-Jeos-8.04.1 on my system.
Everything worked fine. All updates are fine, too.

Now I wanted to see a dialog box asking for username, password, etc.
I analyzed the installer procedure and found out about the package
"user-setup". I installed it and executed "/usr/bin/user-setup":

uli@localhost:~$ dpkg -l user-setup
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Beschreibung
ii user-setup 1.16ubuntu5 Set up initial user and password
uli@localhost:~$ sudo /usr/bin/user-setup
Shadow passwords are now on.
[: 86: x*: unexpected operator

The bug is caused by the file /usr/lib/user-setup/

This patch fixes the issue:

uli@localhost:/usr/lib/user-setup$ diff -u
--- 2008-12-12 15:00:09.000000000 +0100
+++ 2008-12-12 15:00:30.000000000 +0100
@@ -32,7 +32,7 @@
        if [ -e $ROOT/etc/shadow ] && \
           [ "`grep ^root: $ROOT/etc/shadow | cut -d : -f 2`" ] && \
- [ "`grep ^root: $ROOT/etc/shadow | cut -d : -f 2`" != '*' ]; then
+ [ "x`grep ^root: $ROOT/etc/shadow | cut -d : -f 2`" != 'x*' ]; then
                return 0
        if [ -e $ROOT/etc/passwd ] && \

The issue is caused by `grep ... -f 2` being expanded to a single exclamation mark (!)
on my system.

Related branches

Revision history for this message
Uli Heller (uli-werbung) wrote :
Colin Watson (cjwatson)
Changed in user-setup:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Joseph Smidt (jsmidt) wrote :

This debdiff should close the bug. Please sponsor upload.

Colin Watson (cjwatson)
Changed in user-setup:
assignee: nobody → kamion
Revision history for this message
Colin Watson (cjwatson) wrote :

Please don't bump Standards-Version in Ubuntu uploads. (The Ubuntu policy manual tells you not to.)

I'll look at this upstream.

Revision history for this message
Colin Watson (cjwatson) wrote :

Also, you should credit the original submitter of the patch in your changelog entry ...

Finally, there's another line nearby that needs changing too. I'll sort this out.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package user-setup - 1.23ubuntu7

user-setup (1.23ubuntu7) jaunty; urgency=low

  * Backport from trunk:
    - Be more careful about test arguments in the root_password function, in
      case (for example) the encrypted password string is "!" (thanks, Uli
      Heller; LP: #307443).

 -- Colin Watson <email address hidden> Wed, 21 Jan 2009 17:59:52 +0000

Changed in user-setup:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers