Public bug reported:

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":

u...@localhost:~$ dpkg -l user-setup
Desired=Unknown/Install/Remove/Purge/Hold
| 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
u...@localhost:~$ sudo /usr/bin/user-setup
Shadow passwords are now on.
[: 86: x*: unexpected operator
u...@localhost:~$

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

This patch fixes the issue:

u...@localhost:/usr/lib/user-setup$ diff -u functions.sh.orig  functions.sh
--- functions.sh.orig   2008-12-12 15:00:09.000000000 +0100
+++ functions.sh        2008-12-12 15:00:30.000000000 +0100
@@ -32,7 +32,7 @@
        fi
        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
        fi
        if [ -e $ROOT/etc/passwd ] && \

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

** Affects: user-setup (Ubuntu)
     Importance: Undecided
         Status: New

-- 
user-setup produces errors like "[: 86: x*: unexpected operator"
https://bugs.launchpad.net/bugs/307443
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to