Bug 52899 - passwd does not parse options correctly
passwd does not parse options correctly
Product: Red Hat Linux
Classification: Retired
Component: util-linux (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-08-30 13:48 EDT by Ken Cox
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-30 13:48:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ken Cox 2001-08-30 13:48:09 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)

Description of problem:
When running passwd to change a user's password, e.g. passwd bill, passwd 
will print out the usage string and exit.  I am seeing this on the ARM 
embedded platform, but the potential is present to see it on other 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. cross compile for the ARM platform
2. try to change the passwd for a user, e.g. passwd bill

Actual Results:  message is printed:

Usage: passwd [-foqsvV] [user [password]]

Expected Results:  It should have allowed me to set the password for that 

Additional info:

Patch that fixes passwd.c:

--- util-linux-2.10s/login-utils/passwd.c.orig  Thu Aug 30 11:44:41 2001
+++ util-linux-2.10s/login-utils/passwd.c       Thu Aug 30 11:45:04 2001
@@ -234,7 +234,7 @@
     char salt[2];
     int force_passwd = 0;
     int silent = 0;
-    char c;
+    int c;
     int opt_index;
     int fullname = 0, shell = 0;
     static const struct option long_options[] =

Specfile patch:

--- SPECS/util-linux.spec.orig  Thu Aug 30 11:53:01 2001
+++ SPECS/util-linux.spec       Thu Aug 30 11:58:29 2001
@@ -1,7 +1,7 @@
 Summary: A collection of basic system utilities.
 Name: util-linux
 Version: 2.10s
-Release: 12b
+Release: 12b1
 Copyright: distributable
 Group: System Environment/Base
 Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/util-linux-%
@@ -42,6 +42,7 @@
 Patch59: util-linux-2.10s-cross.patch
 Patch60: util-linux-nofdisk.patch
 Patch61: util-linux-2.10s-mount.patch
+Patch62: util-linux-2.10s-passwd.patch

 Obsoletes: fdisk tunelp
 %ifarch alpha sparc sparc64 sparcv9 s390
@@ -105,6 +106,7 @@
 %ifarch sh
 %patch60 -p1
+%patch62 -p1 -b .passwd

 unset LINGUAS || :
Comment 1 Elliot Lee 2002-01-04 12:58:38 EST
This patch appears to be in util-linux-2.11n

Note You need to log in before you can comment on or make changes to this bug.