Bug 111131 - a space after the shell in /etc/passwd causes the shell to fail
Summary: a space after the shell in /etc/passwd causes the shell to fail
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: util-linux
Version: 3.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-28 00:18 UTC by Xander D Harkness
Modified: 2016-06-07 22:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-12-17 21:01:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xander D Harkness 2003-11-28 00:18:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.6a)
Gecko/20031018

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):
setup-2.5.27-1.1

How reproducible:
Always

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-29 02:15:36 UTC
Ignoring it would be a bug. Assigning for possibly checking that there

Comment 2 Elliot Lee 2003-12-17 21:01:46 UTC
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.