Bug 111131 - a space after the shell in /etc/passwd causes the shell to fail
a space after the shell in /etc/passwd causes the shell to fail
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: util-linux (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2003-11-27 19:18 EST by Xander D Harkness
Modified: 2016-06-07 18:44 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-12-17 16:01:46 EST
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 Xander D Harkness 2003-11-27 19:18:24 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.6a)

Description of problem:
A space at the end of a line in /etc/passwd will cause that shell to fail.

This would obviously happen by accident; however it is not something
that vipw checks for on user accounts.

The error message obtained after setting a shell of "/bin/bash " for a
user is:
su: /bin/bash : No such file or directory

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

How reproducible:

Steps to Reproduce:
1.use vipw to enter a space after a shell in /etc/passwd
2. su - to the user, whose shell has been altered
3. The result is su: /bin/bash : No such file or directory

Actual Results:  The user no longer has a valid shell.

Expected Results:  An extra space would be ignored or vipw could at
least check the termination of the lines for a space.

Additional info:
Comment 1 Bill Nottingham 2003-11-28 21:15:36 EST
Ignoring it would be a bug. Assigning for possibly checking that there
Comment 2 Elliot Lee 2003-12-17 16:01:46 EST
vipw doesn't do any checking. This gives the administrator the maximum
flexibility when editing the password file. This also makes the
administrator responsible for the information they enter. :)

This is pretty much a "don't do that" situation.

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