user-setup produces errors like "[: 86: x*: unexpected operator"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
user-setup (Ubuntu) |
Fix Released
|
High
|
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/
uli@localhost:~$ dpkg -l user-setup
Desired=
| Status=
|/ Err?=(none)
||/ 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
uli@localhost:~$
The bug is caused by the file /usr/lib/
This patch fixes the issue:
uli@localhost:
--- 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
fi
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
Changed in user-setup: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in user-setup: | |
assignee: | nobody → kamion |
This debdiff should close the bug. Please sponsor upload.